diff --git a/static/js/stream_edit.js b/static/js/stream_edit.js index 04541b5cb8..11fdbe24c4 100644 --- a/static/js/stream_edit.js +++ b/static/js/stream_edit.js @@ -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 {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, diff --git a/static/styles/subscriptions.css b/static/styles/subscriptions.css index 6b095135dd..798efe1e99 100644 --- a/static/styles/subscriptions.css +++ b/static/styles/subscriptions.css @@ -902,6 +902,10 @@ h4.stream_setting_subsection_title { } } +#archive-stream-modal i { + vertical-align: middle; +} + #stream_privacy_modal, .stream-creation-body { .input-group { diff --git a/static/templates/confirm_dialog/confirm_deactivate_stream.hbs b/static/templates/confirm_dialog/confirm_deactivate_stream.hbs index 56b600e349..c65841f0b0 100644 --- a/static/templates/confirm_dialog/confirm_deactivate_stream.hbs +++ b/static/templates/confirm_dialog/confirm_deactivate_stream.hbs @@ -1,5 +1,4 @@ {{#tr}} Archiving stream will immediately unsubscribe everyone. This action cannot be undone. - {{#*inline "z-stream"}}{{stream_name}}{{/inline}} + {{#*inline "z-stream"}}{{{stream_privacy_symbol_html}}}{{stream_name}}{{/inline}} {{/tr}} -

{{t "Are you sure you want to archive this stream?" }}