Skip to content

Commit b397668

Browse files
committed
Display a link to the upstream archive for messages
1 parent f5efd13 commit b397668

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

app/assets/stylesheets/components/messages.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@
8888
color: var(--color-success);
8989
}
9090

91+
.message-archive-link {
92+
margin-left: auto;
93+
94+
& a {
95+
color: var(--color-text-link);
96+
display: inline-flex;
97+
align-items: center;
98+
}
99+
}
100+
91101
.message-content {
92102
padding: var(--spacing-5);
93103
transition: background-color 0.3s ease, color 0.3s ease;

app/views/topics/_message.html.slim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
- if message.attachments.any?
3030
.attachment-indicator
3131
span.attachment-count #{message.attachments.size} attachment(s)
32+
- if message.message_id.present?
33+
.message-archive-link
34+
= link_to "https://postgr.es/m/#{message.message_id}", target: "_blank", rel: "noopener", data: { turbo: false }, title: "View on postgr.es", "aria-label": "View on postgr.es" do
35+
i.fa-solid.fa-building-columns
3236

3337
.message-content class=read_classes.join(" ") data=read_data
3438
- if message.subject != @topic.title && message.subject.present?

0 commit comments

Comments
 (0)