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.

channel_setting: Hide delete icon in channel folder list.

Pratik Chanda6bed110dc109
diff --git a/web/src/stream_settings_components.ts b/web/src/stream_settings_components.ts
index 18703740107..7c5e027130a 100644
--- a/web/src/stream_settings_components.ts
+++ b/web/src/stream_settings_components.ts
@@ -355,7 +355,7 @@ export function set_up_folder_dropdown_widget(sub?: StreamSubscription): Dropdow
const options: dropdown_widget.Option[] = folders.map((folder) => ({
name: folder.name,
unique_id: folder.id,
- has_delete_icon: true,
+ has_delete_icon: can_manage_folder,
manage_folder_icon: can_manage_folder ? "folder-cog" : "preview",
has_manage_folder_icon: true,
delete_icon_label: $t({defaultMessage: "Delete folder"}),
diff --git a/web/templates/dropdown_list.hbs b/web/templates/dropdown_list.hbs
index db9a8c355a0..eff47eab185 100644
--- a/web/templates/dropdown_list.hbs
+++ b/web/templates/dropdown_list.hbs
@@ -5,7 +5,7 @@
<span class="dropdown-list-item-name">
{{#if bold_current_selection}}
<span class="dropdown-list-text-selected">{{name}}</span>
- {{# if (or has_edit_icon has_delete_icon)}}
+ {{#if (or has_edit_icon has_manage_folder_icon has_delete_icon)}}
<span class="dropdown-list-buttons">
{{#if has_edit_icon}}
{{> components/icon_button custom_classes="dropdown-list-edit dropdown-list-control-button" intent="neutral" icon="edit" aria-label=edit_icon_label }}
@@ -59,7 +59,7 @@
{{else}}
<span class="dropdown-list-text-neutral">{{name}}</span>
{{/if}}
- {{# if (or has_edit_icon has_delete_icon)}}
+ {{#if (or has_edit_icon has_manage_folder_icon has_delete_icon)}}
<span class="dropdown-list-buttons">
{{#if has_edit_icon}}
{{> components/icon_button custom_classes="dropdown-list-edit dropdown-list-control-button" intent="neutral" icon="edit" aria-label=(t "Edit folder") }}