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.

templates: Show archived icon for channels in channel_list_item.hbs.

Pratik Chanda1c0d386d1b2a
diff --git a/web/src/channel_folders_ui.ts b/web/src/channel_folders_ui.ts
index 695cdb28f05..582ea3b6d5c 100644
--- a/web/src/channel_folders_ui.ts
+++ b/web/src/channel_folders_ui.ts
@@ -191,11 +191,7 @@ export function handle_archiving_channel_folder(folder_id: number): void {
function format_channel_item_html(stream: StreamSubscription): string {
return render_channel_list_item({
- name: stream.name,
- stream_id: stream.stream_id,
- stream_color: stream.color,
- invite_only: stream.invite_only,
- is_web_public: stream.is_web_public,
+ stream,
can_manage_folder: settings_data.can_user_manage_folder(),
});
}
diff --git a/web/src/user_profile.ts b/web/src/user_profile.ts
index 7d133e5a72f..d16aaeb3b71 100644
--- a/web/src/user_profile.ts
+++ b/web/src/user_profile.ts
@@ -293,11 +293,7 @@ function format_user_stream_list_item_html(stream: StreamSubscription, user: Use
const show_last_user_in_private_stream_unsub_tooltip =
stream.invite_only && peer_data.get_subscriber_count(stream.stream_id) === 1;
return render_channel_list_item({
- name: stream.name,
- stream_id: stream.stream_id,
- stream_color: stream.color,
- invite_only: stream.invite_only,
- is_web_public: stream.is_web_public,
+ stream,
show_unsubscribe_button,
show_private_stream_unsub_tooltip,
show_last_user_in_private_stream_unsub_tooltip,
diff --git a/web/templates/channel_list_item.hbs b/web/templates/channel_list_item.hbs
index d7cea6c3ab7..deb777905cb 100644
--- a/web/templates/channel_list_item.hbs
+++ b/web/templates/channel_list_item.hbs
@@ -1,10 +1,10 @@
-<li class="stream-list-item modal-list-item" role="presentation" data-stream-id="{{stream_id}}">
+<li class="stream-list-item modal-list-item" role="presentation" data-stream-id="{{stream.stream_id}}">
<div class="modal-channel-list-row hidden-remove-button-row">
- <span class="view-stream-card modal-channel-list-row-content list-row-content" data-stream-id="{{stream_id}}" tabindex="0">
- <span class="stream-privacy-original-color-{{stream_id}} stream-privacy filter-icon" style="color: {{stream_color}}">
- {{> stream_privacy . }}
+ <span class="view-stream-card modal-channel-list-row-content list-row-content" data-stream-id="{{stream.stream_id}}" tabindex="0">
+ <span class="stream-privacy-original-color-{{stream.stream_id}} stream-privacy filter-icon" style="color: {{stream.color}}">
+ {{> stream_privacy stream }}
</span>
- <span class="stream-name list-item-name">{{name}}</span>
+ <span class="stream-name list-item-name">{{stream.name}}</span>
</span>
<div class="remove-button-wrapper">
{{#if show_unsubscribe_button}}