left_sidebar: Add menu to change channel folder setting in left sidebar.

Earlier, you could change setting to show/hide channel folders in
left sidebar from setting overlay.

This commit adds an menu option to toggle channel folders setting in
the left sidebar. The menu is hidden if there are no subscribed
channels with channel folder.

Fixes #35574.
This commit is contained in:
Pratik Chanda
2025-08-05 18:53:48 +05:30
committed by Tim Abbott
parent 35896244d7
commit 8711730e6b
8 changed files with 115 additions and 4 deletions

View File

@@ -8,6 +8,7 @@
<span id="add_streams_tooltip" class="add-stream-icon-container hidden-for-spectators">
<i id="streams_inline_icon" class="add_stream_icon zulip-icon zulip-icon-square-plus" aria-hidden="true" ></i>
</span>
<span class="sidebar-menu-icon channel-folders-sidebar-menu-icon hidden-for-spectators"><i class="zulip-icon zulip-icon-more-vertical" aria-label="{{t 'Show channel folders'}}"></i></span>
</div>
<ul id="left-sidebar-empty-list-message" class="hidden">
{{> empty_list_widget_for_list

View File

@@ -0,0 +1,14 @@
<div class="popover-menu" data-simplebar data-simplebar-tab-index="-1">
<ul role="menu" class="popover-menu-list">
<li role="none" class="link-item popover-menu-list-item">
<a role="menuitem" id="left_sidebar_channel_folders" class="popover-menu-link" tabindex="0">
<i class="popover-menu-icon zulip-icon zulip-icon-folder" aria-hidden="true"></i>
{{#if show_channel_folders}}
<span class="popover-menu-label">{{t "Don't group channels by folder" }}</span>
{{else}}
<span class="popover-menu-label">{{t "Group channels by folder" }}</span>
{{/if}}
</a>
</li>
</ul>
</div>