mirror of
https://github.com/zulip/zulip.git
synced 2025-10-22 20:42:14 +00:00
message_history: Improve overlay header.
If users are only allowed to view move history, the header is 'Message move history.' If users are allowed to view edit and move history and the message is edited and moved, the header is 'Message edit and move history.' Otherwise, it shows 'Message edit history.' If the message is only moved (and not edited), it shows 'Message move history.' Fixes #34005.
This commit is contained in:
@@ -114,11 +114,18 @@ function hide_loading_indicator(): void {
|
||||
}
|
||||
|
||||
export function fetch_and_render_message_history(message: Message): void {
|
||||
assert(message_lists.current !== undefined);
|
||||
const message_container = message_lists.current.view.message_containers.get(message.id);
|
||||
assert(message_container !== undefined);
|
||||
const move_history_only =
|
||||
realm.realm_message_edit_history_visibility_policy ===
|
||||
message_edit_history_visibility_policy_values.moves_only.code;
|
||||
$("#message-edit-history-overlay-container").html(
|
||||
render_message_history_overlay({move_history_only}),
|
||||
render_message_history_overlay({
|
||||
moved: message_container.moved,
|
||||
edited: message_container.edited,
|
||||
move_history_only,
|
||||
}),
|
||||
);
|
||||
open_overlay();
|
||||
show_loading_indicator();
|
||||
|
@@ -5,7 +5,15 @@
|
||||
{{#if move_history_only}}
|
||||
<h1>{{t "Message move history" }}</h1>
|
||||
{{else}}
|
||||
<h1>{{t "Message edit history" }}</h1>
|
||||
{{#if edited}}
|
||||
{{#if moved}}
|
||||
<h1>{{t "Message edit and move history" }}</h1>
|
||||
{{else}}
|
||||
<h1>{{t "Message edit history" }}</h1>
|
||||
{{/if}}
|
||||
{{else if moved}}
|
||||
<h1>{{t "Message move history" }}</h1>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
<div class="exit">
|
||||
<span class="exit-sign">×</span>
|
||||
|
Reference in New Issue
Block a user