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.

stream-settings: Show icon according to in the right column title.

Sahil Batra7265a76fc6d7
diff --git a/frontend_tests/node_tests/stream_edit.js b/frontend_tests/node_tests/stream_edit.js
index 154f09d41ec..e94ccd3277a 100644
--- a/frontend_tests/node_tests/stream_edit.js
+++ b/frontend_tests/node_tests/stream_edit.js
@@ -128,6 +128,11 @@ test_ui("subscriber_pills", ({override_rewire, mock_template}) => {
false,
() => "stream_subscription_request_result",
);
+ mock_template(
+ "stream_settings/selected_stream_title.hbs",
+ false,
+ () => "selected_stream_title",
+ );
override_rewire(people, "sort_but_pin_current_user_on_top", noop);
diff --git a/static/js/stream_edit.js b/static/js/stream_edit.js
index 273108bf7e0..765d48e9a69 100644
--- a/static/js/stream_edit.js
+++ b/static/js/stream_edit.js
@@ -138,7 +138,7 @@ export function open_edit_panel_for_row(stream_row) {
const sub = get_sub_for_target(stream_row);
$(".stream-row.active").removeClass("active");
- stream_settings_ui.show_subs_pane.settings(sub.name);
+ stream_settings_ui.show_subs_pane.settings(sub.name, sub.invite_only, sub.is_web_public);
$(stream_row).addClass("active");
setup_subscriptions_stream_hash(sub);
setup_stream_settings(stream_row);
diff --git a/static/js/stream_settings_ui.js b/static/js/stream_settings_ui.js
index 85ea61496d1..13439a31e7a 100644
--- a/static/js/stream_settings_ui.js
+++ b/static/js/stream_settings_ui.js
@@ -5,6 +5,7 @@ import tippy from "tippy.js";
import render_unsubscribe_private_stream_modal from "../templates/confirm_dialog/confirm_unsubscribe_private_stream.hbs";
import render_browse_streams_list from "../templates/stream_settings/browse_streams_list.hbs";
import render_browse_streams_list_item from "../templates/stream_settings/browse_streams_list_item.hbs";
+import render_selected_stream_title from "../templates/stream_settings/selected_stream_title.hbs";
import render_stream_settings from "../templates/stream_settings/stream_settings.hbs";
import render_stream_settings_overlay from "../templates/stream_settings/stream_settings_overlay.hbs";
@@ -44,10 +45,16 @@ export const show_subs_pane = {
$(".nothing-selected").show();
$("#subscription_overlay .stream-info-title").text($t({defaultMessage: "Stream settings"}));
},
- settings(stream_name) {
+ settings(stream_name, invite_only, is_web_public) {
$(".settings, #stream-creation").hide();
$(".settings").show();
- $("#subscription_overlay .stream-info-title").text("# " + stream_name);
+ $("#subscription_overlay .stream-info-title").html(
+ render_selected_stream_title({
+ stream_name,
+ invite_only,
+ is_web_public,
+ }),
+ );
},
create_stream() {
$(".nothing-selected, .settings, #stream-creation").hide();
diff --git a/static/styles/subscriptions.css b/static/styles/subscriptions.css
index 23cde9ae3f7..9e9ed39330b 100644
--- a/static/styles/subscriptions.css
+++ b/static/styles/subscriptions.css
@@ -522,6 +522,10 @@ h4.stream_setting_subsection_title {
line-height: 1;
margin: 9px 0;
font-weight: 600;
+
+ .large-icon {
+ display: inline-block;
+ }
}
}
@@ -907,6 +911,8 @@ h4.stream_setting_subsection_title {
&.hash::after {
top: 1px;
+ font-size: 1.09em;
+ font-weight: 800;
}
}
@@ -967,8 +973,6 @@ h4.stream_setting_subsection_title {
.hash::after {
position: relative;
content: "#";
- font-size: 1.09em;
- font-weight: 800;
}
.settings {
diff --git a/static/templates/stream_settings/selected_stream_title.hbs b/static/templates/stream_settings/selected_stream_title.hbs
new file mode 100644
index 00000000000..657c547d9bb
--- /dev/null
+++ b/static/templates/stream_settings/selected_stream_title.hbs
@@ -0,0 +1,4 @@
+{{> stream_privacy_icon
+ invite_only=invite_only
+ is_web_public=is_web_public }}
+<span class="stream-name-title">{{stream_name}}</span>