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: Make stream name in right panel header a link.

somudasf00f4f95bef0
diff --git a/web/src/stream_settings_components.js b/web/src/stream_settings_components.js
index 0004886e56c..c628fa92cfc 100644
--- a/web/src/stream_settings_components.js
+++ b/web/src/stream_settings_components.js
@@ -7,6 +7,7 @@ import render_selected_stream_title from "../templates/stream_settings/selected_
import * as channel from "./channel";
import * as confirm_dialog from "./confirm_dialog";
import * as dropdown_widget from "./dropdown_widget";
+import * as hash_util from "./hash_util";
import {$t, $t_html} from "./i18n";
import * as loading from "./loading";
import * as overlays from "./overlays";
@@ -24,8 +25,10 @@ export function set_right_panel_title(sub) {
if (settings_data.using_dark_theme()) {
title_icon_color = "#dddeee";
}
+
+ const preview_url = hash_util.by_stream_url(sub.stream_id);
$("#subscription_overlay .stream-info-title").html(
- render_selected_stream_title({sub, title_icon_color}),
+ render_selected_stream_title({sub, title_icon_color, preview_url}),
);
}
diff --git a/web/styles/subscriptions.css b/web/styles/subscriptions.css
index a3fbe658052..d4cb69721d1 100644
--- a/web/styles/subscriptions.css
+++ b/web/styles/subscriptions.css
@@ -400,6 +400,15 @@ h4.user_group_setting_subsection_title {
font-weight: 600;
border-bottom: 1px solid hsl(0deg 0% 87%);
+ & a {
+ color: inherit;
+
+ &:hover {
+ color: inherit;
+ text-decoration: none;
+ }
+ }
+
&.preview::after {
content: "Preview";
}
diff --git a/web/templates/stream_settings/selected_stream_title.hbs b/web/templates/stream_settings/selected_stream_title.hbs
index 9a2ecfa824a..a0641d49cf2 100644
--- a/web/templates/stream_settings/selected_stream_title.hbs
+++ b/web/templates/stream_settings/selected_stream_title.hbs
@@ -1,5 +1,7 @@
-{{> stream_privacy_icon
- invite_only=sub.invite_only
- is_web_public=sub.is_web_public
- color=title_icon_color }}
-<span class="stream-name-title">{{sub.name}}</span>
+<a class="tippy-zulip-delayed-tooltip" data-tooltip-template-id="view-stream-tooltip-template" data-tippy-placement="top" href="{{preview_url}}">
+ {{> stream_privacy_icon
+ invite_only=sub.invite_only
+ is_web_public=sub.is_web_public
+ color=title_icon_color }}
+ <span class="stream-name-title">{{sub.name}}</span>
+</a>