diff --git a/src/lib/components/app/AppControls.svelte b/src/lib/components/app/AppControls.svelte new file mode 100644 index 000000000..66d7d2b4b --- /dev/null +++ b/src/lib/components/app/AppControls.svelte @@ -0,0 +1,61 @@ + + +
+
+ {#if selected === 'home'} +
+
+
+ {/if} + + + + +
+ +
+ +
+ {#if selected === ''} +
+
+
+ {/if} + +
+ +
+ +
+
diff --git a/src/lib/components/channel/Channel.svelte b/src/lib/components/channel/Channel.svelte index 68d35a4c6..5bc524009 100644 --- a/src/lib/components/channel/Channel.svelte +++ b/src/lib/components/channel/Channel.svelte @@ -199,7 +199,7 @@
{#if $settings?.backgroundImageUrl ?? null} diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index 2844f61e5..7644d1e8b 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -19,7 +19,8 @@ temporaryChatEnabled, channels, socket, - config + config, + isApp } from '$lib/stores'; import { onMount, getContext, tick, onDestroy } from 'svelte'; @@ -426,7 +427,9 @@ {#if $showSidebar}
{ showSidebar.set(!$showSidebar); }} @@ -438,7 +441,9 @@ id="sidebar" class="h-screen max-h-[100dvh] min-h-screen select-none {$showSidebar ? 'md:relative w-[260px] max-w-[260px]' - : '-translate-x-[260px] w-[0px]'} bg-gray-50 text-gray-900 dark:bg-gray-950 dark:text-gray-200 text-sm transition fixed z-50 top-0 left-0 overflow-x-hidden + : '-translate-x-[260px] w-[0px]'} {$isApp + ? ' ml-[4.5rem] md:ml-0' + : 'transition-width duration-300 ease-in-out flex-shrink-0'} bg-gray-50 text-gray-900 dark:bg-gray-950 dark:text-gray-200 text-sm fixed z-50 top-0 left-0 overflow-x-hidden " data-state={$showSidebar} > diff --git a/src/lib/stores/index.ts b/src/lib/stores/index.ts index 7fd9b7bf0..88999afbf 100644 --- a/src/lib/stores/index.ts +++ b/src/lib/stores/index.ts @@ -11,6 +11,10 @@ export const WEBUI_NAME = writable(APP_NAME); export const config: Writable = writable(undefined); export const user: Writable = writable(undefined); +// Electron App +export const isApp = writable(false); +export const appVersion = writable(null); + // Frontend export const MODEL_DOWNLOAD_POOL = writable({}); diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte index 72ae6229d..34843469b 100644 --- a/src/routes/(app)/+layout.svelte +++ b/src/routes/(app)/+layout.svelte @@ -233,7 +233,7 @@
{#if loaded} {#if !['user', 'admin'].includes($user.role)} diff --git a/src/routes/(app)/admin/+layout.svelte b/src/routes/(app)/admin/+layout.svelte index 711781d8e..45b3f39f1 100644 --- a/src/routes/(app)/admin/+layout.svelte +++ b/src/routes/(app)/admin/+layout.svelte @@ -26,13 +26,13 @@ {#if loaded}