From edb050fd3920bd31b402a2dc64814279c976367a Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Sat, 21 Mar 2026 18:38:47 +0100 Subject: [PATCH] feat: add category settings context menu, lock icon, empty category hiding --- .../src/components/layout/ChannelSidebar.tsx | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/web/src/components/layout/ChannelSidebar.tsx b/packages/web/src/components/layout/ChannelSidebar.tsx index e125e1f5..d54eac9d 100644 --- a/packages/web/src/components/layout/ChannelSidebar.tsx +++ b/packages/web/src/components/layout/ChannelSidebar.tsx @@ -670,6 +670,10 @@ export function ChannelSidebar() { {/* Categories with their channels */} {sortedCategories.map((category) => { const catChannels = channelsByCategory.get(category.id) ?? []; + + // Hide empty categories for users without MANAGE_CHANNELS permission + if (!canManageChannels && catChannels.length === 0) return null; + const isCollapsed = collapsedCategories.has(category.id); const hasUnread = isCollapsed && categoryHasUnread(category.id); @@ -686,6 +690,11 @@ export function ChannelSidebar() { {category.name} + {category.isPrivate && ( + + + + )} {hasUnread && (
)} @@ -715,6 +724,17 @@ export function ChannelSidebar() { e.preventDefault(); e.stopPropagation(); openContextMenu({ x: e.clientX, y: e.clientY }, [ + { + key: 'category-settings', + type: 'action', + label: 'Category Settings', + icon: ( + + + + ), + onClick: () => openModal('categorySettings', { categoryId: category.id }), + }, { key: 'delete-category', type: 'action',