From 8565aad3fa9d4ec193174e94c3a24cb65682125a Mon Sep 17 00:00:00 2001 From: Sahil Batra Date: Tue, 1 Feb 2022 23:11:55 +0530 Subject: [PATCH] stream_settings: Fix color of icon of the title in right column. This commit fixes two things - - We use the exact same color that is used for stream name in day mode. - Previously, we were passing black color explicitly to the stream_privacy_icon template. This commit changes it to pass different color in the night mode which is the same used for stream name in night mode. --- static/js/stream_settings_ui.js | 8 +++++++- .../templates/stream_settings/selected_stream_title.hbs | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/static/js/stream_settings_ui.js b/static/js/stream_settings_ui.js index 24aebd0592..c61c7be25f 100644 --- a/static/js/stream_settings_ui.js +++ b/static/js/stream_settings_ui.js @@ -40,7 +40,13 @@ import * as ui_report from "./ui_report"; import * as util from "./util"; export function set_right_panel_title(sub) { - $("#subscription_overlay .stream-info-title").html(render_selected_stream_title(sub)); + let title_icon_color = "#333333"; + if (settings_data.using_dark_theme()) { + title_icon_color = "#dddeee"; + } + $("#subscription_overlay .stream-info-title").html( + render_selected_stream_title({sub, title_icon_color}), + ); } export const show_subs_pane = { diff --git a/static/templates/stream_settings/selected_stream_title.hbs b/static/templates/stream_settings/selected_stream_title.hbs index c4d06c1c48..9a2ecfa824 100644 --- a/static/templates/stream_settings/selected_stream_title.hbs +++ b/static/templates/stream_settings/selected_stream_title.hbs @@ -1,5 +1,5 @@ {{> stream_privacy_icon - invite_only=invite_only - is_web_public=is_web_public - color="#000000" }} -{{name}} + invite_only=sub.invite_only + is_web_public=sub.is_web_public + color=title_icon_color }} +{{sub.name}}