From 47ec443728909e447e1d588cae61cd44311643ce Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 19 Aug 2025 02:03:43 +0400 Subject: [PATCH] refac: temp chat button location --- src/lib/components/chat/ModelSelector.svelte | 4 -- src/lib/components/chat/Navbar.svelte | 51 +++++++++++++------ .../icons/AdjustmentsHorizontal.svelte | 4 +- .../components/icons/ChatBubbleDotted.svelte | 20 ++++++++ .../icons/ChatBubbleDottedChecked.svelte | 21 ++++++++ 5 files changed, 80 insertions(+), 20 deletions(-) create mode 100644 src/lib/components/icons/ChatBubbleDotted.svelte create mode 100644 src/lib/components/icons/ChatBubbleDottedChecked.svelte diff --git a/src/lib/components/chat/ModelSelector.svelte b/src/lib/components/chat/ModelSelector.svelte index b215ad589..f247ce118 100644 --- a/src/lib/components/chat/ModelSelector.svelte +++ b/src/lib/components/chat/ModelSelector.svelte @@ -58,10 +58,6 @@ label: model.name, model: model }))} - showTemporaryChatControl={$user?.role === 'user' - ? ($user?.permissions?.chat?.temporary ?? true) && - !($user?.permissions?.chat?.temporary_enforced ?? false) - : true} {pinModelHandler} bind:value={selectedModel} /> diff --git a/src/lib/components/chat/Navbar.svelte b/src/lib/components/chat/Navbar.svelte index b44ced62d..7012583ae 100644 --- a/src/lib/components/chat/Navbar.svelte +++ b/src/lib/components/chat/Navbar.svelte @@ -30,6 +30,12 @@ import Banner from '../common/Banner.svelte'; import Sidebar from '../icons/Sidebar.svelte'; + import ChatBubbleDotted from '../icons/ChatBubbleDotted.svelte'; + import ChatBubbleDottedChecked from '../icons/ChatBubbleDottedChecked.svelte'; + + import EllipsisHorizontal from '../icons/EllipsisHorizontal.svelte'; + import { goto } from '$app/navigation'; + const i18n = getContext('i18n'); export let initNewChat: Function; @@ -98,6 +104,34 @@
+ + {#if !chat?.id && ($user?.role === 'user' ? ($user?.permissions?.chat?.temporary ?? true) && !($user?.permissions?.chat?.temporary_enforced ?? false) : true)} + + + + {/if} + {#if shareEnabled && chat && (chat.id || $temporaryChatEnabled)}
- - - +
@@ -143,7 +164,7 @@ aria-label="Controls" >
- +
diff --git a/src/lib/components/icons/AdjustmentsHorizontal.svelte b/src/lib/components/icons/AdjustmentsHorizontal.svelte index 4cc509e84..d45b87b6e 100644 --- a/src/lib/components/icons/AdjustmentsHorizontal.svelte +++ b/src/lib/components/icons/AdjustmentsHorizontal.svelte @@ -12,6 +12,8 @@ stroke-width={strokeWidth} > diff --git a/src/lib/components/icons/ChatBubbleDotted.svelte b/src/lib/components/icons/ChatBubbleDotted.svelte new file mode 100644 index 000000000..fb2d18e7c --- /dev/null +++ b/src/lib/components/icons/ChatBubbleDotted.svelte @@ -0,0 +1,20 @@ + + + + + diff --git a/src/lib/components/icons/ChatBubbleDottedChecked.svelte b/src/lib/components/icons/ChatBubbleDottedChecked.svelte new file mode 100644 index 000000000..6a4e1c8e1 --- /dev/null +++ b/src/lib/components/icons/ChatBubbleDottedChecked.svelte @@ -0,0 +1,21 @@ + + + + + +