Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
starred messages: Clean up "unstar all in topic" warning.
Abhijeet Prasad Bodasded3d94f62df
diff --git a/static/js/starred_messages_ui.js b/static/js/starred_messages_ui.jsindex 46fbec004a7..3c0d3e76ced 100644--- a/static/js/starred_messages_ui.js+++ b/static/js/starred_messages_ui.js@@ -6,6 +6,7 @@ import render_confirm_unstar_all_messages_in_topic from "../templates/confirm_unimport * as confirm_dialog from "./confirm_dialog";import {$t_html} from "./i18n";import * as message_flags from "./message_flags";+import * as stream_data from "./stream_data";export function confirm_unstar_all_messages() {const modal_parent = $(".left-sidebar-modal-holder");@@ -25,8 +26,14 @@ export function confirm_unstar_all_messages_in_topic(stream_id, topic) {message_flags.unstar_all_messages_in_topic(stream_id, topic);}+ const stream_name = stream_data.maybe_get_stream_name(stream_id);+ if (stream_name === undefined) {+ return;+ }+const modal_parent = $(".left-sidebar-modal-holder");const html_body = render_confirm_unstar_all_messages_in_topic({+ stream_name,topic,});diff --git a/static/templates/confirm_unstar_all_messages_in_topic.hbs b/static/templates/confirm_unstar_all_messages_in_topic.hbsindex c33790b631f..9f95bfcb0d1 100644--- a/static/templates/confirm_unstar_all_messages_in_topic.hbs+++ b/static/templates/confirm_unstar_all_messages_in_topic.hbs@@ -1,5 +1,6 @@<p>{{#tr}}- Are you sure you want to unstar all messages in topic <b>{topic}</b>? This action cannot be undone.+ Are you sure you want to unstar all messages in <stream-topic></stream-topic>? This action cannot be undone.+ {{#*inline "stream-topic"}}{{> stream_topic_widget}}{{/inline}}{{/tr}}</p>diff --git a/static/templates/stream_topic_widget.hbs b/static/templates/stream_topic_widget.hbsnew file mode 100644index 00000000000..ac8b0297634--- /dev/null+++ b/static/templates/stream_topic_widget.hbs@@ -0,0 +1,3 @@+<strong>+ <span class="stream">{{stream_name}}</span> > <span class="topic">{{topic}}</span>+</strong>