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.

streams: Update modals shown on removing user from private stream.

Sahil Batra052299f056a9
diff --git a/web/src/stream_edit_subscribers.js b/web/src/stream_edit_subscribers.js
index d651bdcd947..6275d6859fa 100644
--- a/web/src/stream_edit_subscribers.js
+++ b/web/src/stream_edit_subscribers.js
@@ -263,15 +263,13 @@ function remove_subscriber({stream_id, target_user_id, $list_entry}) {
});
const html_body = render_unsubscribe_private_stream_modal({
- message: $t({
- defaultMessage: "Once you leave this stream, you will not be able to rejoin.",
- }),
+ unsubscribing_other_user: false,
display_stream_archive_warning: sub_count === 1,
});
confirm_dialog.launch({
html_heading: $t_html(
- {defaultMessage: "Unsubscribe from <z-link></z-link>"},
+ {defaultMessage: "Unsubscribe from <z-link></z-link>?"},
{"z-link": () => stream_name_with_privacy_symbol_html},
),
html_body,
diff --git a/web/src/stream_settings_components.js b/web/src/stream_settings_components.js
index 5f384eae2c3..6159b768f4c 100644
--- a/web/src/stream_settings_components.js
+++ b/web/src/stream_settings_components.js
@@ -196,9 +196,7 @@ export function unsubscribe_from_private_stream(sub) {
const stream_name_with_privacy_symbol_html = render_inline_decorated_stream_name({stream: sub});
const html_body = render_unsubscribe_private_stream_modal({
- message: $t({
- defaultMessage: "Once you leave this stream, you will not be able to rejoin.",
- }),
+ unsubscribing_other_user: false,
display_stream_archive_warning: sub_count === 1 && invite_only,
});
@@ -215,7 +213,7 @@ export function unsubscribe_from_private_stream(sub) {
confirm_dialog.launch({
html_heading: $t_html(
- {defaultMessage: "Unsubscribe from <z-link></z-link>"},
+ {defaultMessage: "Unsubscribe from <z-link></z-link>?"},
{"z-link": () => stream_name_with_privacy_symbol_html},
),
html_body,
diff --git a/web/templates/confirm_dialog/confirm_unsubscribe_private_stream.hbs b/web/templates/confirm_dialog/confirm_unsubscribe_private_stream.hbs
index 78d09d2ab03..3cb4b2f8a7c 100644
--- a/web/templates/confirm_dialog/confirm_unsubscribe_private_stream.hbs
+++ b/web/templates/confirm_dialog/confirm_unsubscribe_private_stream.hbs
@@ -1,4 +1,11 @@
-<p>{{message}}</p>
+{{#unless unsubscribing_other_user}}
+ <p>{{t "Once you leave this stream, you will not be able to rejoin."}}</p>
+{{/unless}}
{{#if display_stream_archive_warning}}
- <p>{{t "Because you are the only subscriber, this stream will be automatically archived." }}</p>
+ <p>
+ {{#tr}}
+ Because you are the only subscriber, this stream will be automatically <z-link>archived</z-link>.
+ {{#*inline "z-link"}}<a target="_blank" rel="noopener noreferrer" href="/help/archive-a-stream">{{> @partial-block}}</a>{{/inline}}
+ {{/tr}}
+ </p>
{{/if}}