Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

message_view: Make timestamp a permalink to message.

Dineshbe3b63760382
diff --git a/static/js/message_list_view.js b/static/js/message_list_view.js
index 8c5e8249e48..4ce1d2b866c 100644
--- a/static/js/message_list_view.js
+++ b/static/js/message_list_view.js
@@ -647,6 +647,8 @@ export class MessageListView {
message.starred_status = $t({defaultMessage: "Star"});
}
+ message.url = hash_util.by_conversation_and_time_uri(message);
+
return {msg: message};
});
diff --git a/static/styles/night_mode.css b/static/styles/night_mode.css
index 99ec7bc1141..3bd49b6318d 100644
--- a/static/styles/night_mode.css
+++ b/static/styles/night_mode.css
@@ -285,6 +285,11 @@ on a dark background, and don't change the dark labels dark either. */
}
}
+ /* Disable blue link styling for the message timestamp link. */
+ .message_time {
+ color: hsl(236, 33%, 90%);
+ }
+
.emoji-popover .reaction:focus {
box-shadow: 0 0 1px hsl(0, 0%, 98%);
}
diff --git a/static/styles/zulip.css b/static/styles/zulip.css
index 131de91df80..ebc740d3abb 100644
--- a/static/styles/zulip.css
+++ b/static/styles/zulip.css
@@ -834,6 +834,8 @@ td.pointer {
right: -105px;
line-height: 20px;
text-align: right;
+ /* Disable blue link styling for the message timestamp link. */
+ color: hsl(0, 0%, 20%);
transition: background-color 1.5s ease-in, color 1.5s ease-in;
}
diff --git a/static/templates/message_body.hbs b/static/templates/message_body.hbs
index 782ab78ffdb..255f7293c1c 100644
--- a/static/templates/message_body.hbs
+++ b/static/templates/message_body.hbs
@@ -19,12 +19,12 @@
<span class="alert-msg pull-right"></span>
- <span class="message_time{{#if msg.locally_echoed}} notvisible{{/if}}{{#if status_message}} status-time{{/if}}">
+ <a href="{{ msg/url }}" class="message_time{{#if msg.locally_echoed}} notvisible{{/if}}{{#if status_message}} status-time{{/if}}">
{{#unless include_sender}}
<span class="copy-paste-text">&nbsp;</span>
{{/unless}}
{{timestr}}
- </span>
+ </a>
{{#if edited_alongside_sender}}
{{> edited_notice}}