archive stream: Update modal text.

Fixes #22658.
This commit is contained in:
Ganesh Pawar 2022-08-04 23:11:55 +05:30 committed by Tim Abbott
parent bd04733c0f
commit 5697f7f269
3 changed files with 15 additions and 4 deletions

View File

@ -1,6 +1,7 @@
import $ from "jquery";
import render_settings_deactivation_stream_modal from "../templates/confirm_dialog/confirm_deactivate_stream.hbs";
import render_stream_privacy from "../templates/stream_privacy.hbs";
import render_change_stream_info_modal from "../templates/stream_settings/change_stream_info_modal.hbs";
import render_stream_description from "../templates/stream_settings/stream_description.hbs";
import render_stream_settings from "../templates/stream_settings/stream_settings.hbs";
@ -662,16 +663,23 @@ export function initialize() {
archive_stream(stream_id, $(".stream_change_property_info"), $row);
}
const stream = sub_store.get(stream_id);
const stream_privacy_symbol_html = render_stream_privacy({
invite_only: stream.invite_only,
is_web_public: stream.is_web_public,
});
const stream_name = stream_data.maybe_get_stream_name(stream_id);
const html_body = render_settings_deactivation_stream_modal({
stream_name,
stream_privacy_symbol_html,
});
confirm_dialog.launch({
html_heading: $t_html(
{defaultMessage: "Archive stream {stream}"},
{stream: stream_name},
{defaultMessage: "Archive <z-link></z-link>{stream}?"},
{stream: stream_name, "z-link": () => stream_privacy_symbol_html},
),
id: "archive-stream-modal",
help_link: "/help/archive-a-stream",
html_body,
on_click: do_archive_stream,

View File

@ -902,6 +902,10 @@ h4.stream_setting_subsection_title {
}
}
#archive-stream-modal i {
vertical-align: middle;
}
#stream_privacy_modal,
.stream-creation-body {
.input-group {

View File

@ -1,5 +1,4 @@
{{#tr}}
Archiving stream <z-stream></z-stream> will immediately unsubscribe everyone. This action cannot be undone.
{{#*inline "z-stream"}}<strong>{{stream_name}}</strong>{{/inline}}
{{#*inline "z-stream"}}<strong>{{{stream_privacy_symbol_html}}}{{stream_name}}</strong>{{/inline}}
{{/tr}}
<p><strong>{{t "Are you sure you want to archive this stream?" }}</strong></p>