From a57a01a59817da103dd9ff0d722d386405b50015 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Tue, 14 May 2024 14:50:24 -1000 Subject: [PATCH] refac: navbar styling --- src/lib/components/layout/Navbar.svelte | 35 +++++++++- src/lib/components/layout/Sidebar.svelte | 69 +++++++++++-------- .../components/layout/Sidebar/UserMenu.svelte | 2 +- 3 files changed, 75 insertions(+), 31 deletions(-) diff --git a/src/lib/components/layout/Navbar.svelte b/src/lib/components/layout/Navbar.svelte index 99d8cac43..15a9c1cf3 100644 --- a/src/lib/components/layout/Navbar.svelte +++ b/src/lib/components/layout/Navbar.svelte @@ -2,7 +2,16 @@ import { getContext } from 'svelte'; import { toast } from 'svelte-sonner'; - import { WEBUI_NAME, chatId, modelfiles, settings, showSettings, showSidebar } from '$lib/stores'; + import { + WEBUI_NAME, + chatId, + mobile, + modelfiles, + settings, + showSettings, + showSidebar, + user + } from '$lib/stores'; import { slide } from 'svelte/transition'; import ShareChatModal from '../chat/ShareChatModal.svelte'; @@ -10,6 +19,7 @@ import Tooltip from '../common/Tooltip.svelte'; import Menu from './Navbar/Menu.svelte'; import { page } from '$app/stores'; + import UserMenu from './Sidebar/UserMenu.svelte'; const i18n = getContext('i18n'); @@ -155,6 +165,29 @@ + + {#if !$mobile && $user !== undefined} + { + if (e.detail === 'archived-chat') { + // showArchivedChatsModal = true; + } + }} + > + + + {/if} diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index 87137a8a4..0d7ce0215 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -1,6 +1,15 @@