mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-06 03:28:12 -05:00
refac
This commit is contained in:
1 parent
be9a4f81df
commit
2a6adef639
1 file changed
+15
-2
@@ -186,7 +186,7 @@
|
||||
</Tooltip>
|
||||
{/snippet}
|
||||
|
||||
{#snippet renderChatActions()}
|
||||
{#snippet renderTemporaryChatToggle()}
|
||||
{#if $user?.role === 'user' ? ($user?.permissions?.chat?.temporary ?? true) && !($user?.permissions?.chat?.temporary_enforced ?? false) : true}
|
||||
{#if !chat?.id}
|
||||
<Tooltip content={$i18n.t(`Temporary Chat`)}>
|
||||
@@ -221,7 +221,14 @@
|
||||
{/if}
|
||||
</button>
|
||||
</Tooltip>
|
||||
{:else if chat?.id && $temporaryChatEnabled}
|
||||
{/if}
|
||||
{/if}
|
||||
{/snippet}
|
||||
|
||||
{#snippet renderChatActions()}
|
||||
{#if !tabbed}{@render renderTemporaryChatToggle()}{/if}
|
||||
{#if $user?.role === 'user' ? ($user?.permissions?.chat?.temporary ?? true) && !($user?.permissions?.chat?.temporary_enforced ?? false) : true}
|
||||
{#if chat?.id && $temporaryChatEnabled}
|
||||
<Tooltip content={$i18n.t(`Save Chat`)}>
|
||||
<button
|
||||
class="flex size-6 cursor-pointer items-center justify-center rounded-lg text-gray-500 transition hover:bg-gray-50/40 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800/40 dark:hover:text-gray-200"
|
||||
@@ -290,6 +297,12 @@
|
||||
|
||||
<ShareChatModal bind:show={showShareChatModal} chatId={$chatId} />
|
||||
|
||||
{#if tabbed && !chat?.id}
|
||||
<div class="absolute right-2.5 top-0 z-30 flex items-center">
|
||||
{@render renderTemporaryChatToggle()}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<button
|
||||
id="new-chat-button"
|
||||
class="hidden"
|
||||
|
||||
Reference in new issue
Block a user