From 9f17c5960a0e47a09773da4bba12997a31222fc8 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 14 Jul 2026 14:33:10 -0400 Subject: [PATCH] refac --- src/lib/components/channel/Navbar.svelte | 13 +- src/lib/components/layout/Sidebar.svelte | 11 -- .../components/layout/Sidebar/UserMenu.svelte | 118 +++++++----------- 3 files changed, 48 insertions(+), 94 deletions(-) diff --git a/src/lib/components/channel/Navbar.svelte b/src/lib/components/channel/Navbar.svelte index 11927bcb5f..a8aeaef910 100644 --- a/src/lib/components/channel/Navbar.svelte +++ b/src/lib/components/channel/Navbar.svelte @@ -2,7 +2,7 @@ import { getContext } from 'svelte'; import { toast } from 'svelte-sonner'; - import { mobile, showSettings, showSidebar, user } from '$lib/stores'; + import { mobile, showSidebar, user } from '$lib/stores'; import { slide } from 'svelte/transition'; import { page } from '$app/stores'; @@ -196,16 +196,7 @@ {#if $user !== undefined}
- { - if (e.detail === 'archived-chat') { - showSettings.set('archived_chats'); - } - }} - > + - - {#if role === 'admin'} - { - if (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1) { - return; - } - e.preventDefault(); - show = false; - goto('/admin'); - if ($mobile) { - await tick(); - showSidebar.set(false); - } - }} - > -
- -
-
{$i18n.t('Admin Panel')}
-
- {/if} - - - -
- {#if $user?.role === 'admin' || $user?.permissions?.workspace?.models || $user?.permissions?.workspace?.knowledge || $user?.permissions?.workspace?.prompts || $user?.permissions?.workspace?.tools || $user?.permissions?.workspace?.skills}