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
394fcc7e24
commit
97e013a661
8 files changed
+75
-51
No files matched your search
@@ -87,7 +87,6 @@
|
||||
{compactPreview}
|
||||
{editCodeBlock}
|
||||
{topPadding}
|
||||
{onInsertToNote}
|
||||
/>
|
||||
{:else if (history.messages[history.messages[messageId].parentId]?.models?.length ?? 1) === 1}
|
||||
<ResponseMessage
|
||||
@@ -118,6 +117,7 @@
|
||||
{compactPreview}
|
||||
{editCodeBlock}
|
||||
{topPadding}
|
||||
{onInsertToNote}
|
||||
/>
|
||||
{:else}
|
||||
{#key messageId}
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
import RateComment from './RateComment.svelte';
|
||||
import WebSearchResults from './ResponseMessage/WebSearchResults.svelte';
|
||||
import Sparkles from '$lib/components/icons/Sparkles.svelte';
|
||||
import ArrowUpLeft from '$lib/components/icons/ArrowUpLeft.svelte';
|
||||
|
||||
import DeleteConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
|
||||
|
||||
@@ -943,6 +944,22 @@
|
||||
class="flex items-center justify-start overflow-x-auto whitespace-nowrap buttons text-gray-600 dark:text-gray-500 mt-0.5 [&>*]:shrink-0"
|
||||
>
|
||||
{#if message.done || siblings.length > 1}
|
||||
{#if message.done && onInsertToNote && visibleResponseContent}
|
||||
<Tooltip content={$i18n.t('Insert into note')} placement="bottom">
|
||||
<button
|
||||
aria-label={$i18n.t('Insert into note')}
|
||||
class="{isLastMessage || ($settings?.highContrastMode ?? false)
|
||||
? 'visible'
|
||||
: 'hover-reveal'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition"
|
||||
on:click={() => {
|
||||
onInsertToNote?.(visibleResponseContent);
|
||||
}}
|
||||
>
|
||||
<ArrowUpLeft className="size-3.5" strokeWidth="2" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
{/if}
|
||||
|
||||
{#if siblings.length > 1}
|
||||
<div class="flex self-center min-w-fit" dir="ltr">
|
||||
<button
|
||||
@@ -1101,22 +1118,6 @@
|
||||
</button>
|
||||
</Tooltip>
|
||||
|
||||
{#if onInsertToNote && visibleResponseContent}
|
||||
<Tooltip content={$i18n.t('Insert into note')} placement="bottom">
|
||||
<button
|
||||
aria-label={$i18n.t('Insert into note')}
|
||||
class="{isLastMessage || ($settings?.highContrastMode ?? false)
|
||||
? 'visible'
|
||||
: 'hover-reveal'} rounded-lg px-2 py-1.5 text-xs text-gray-500 transition hover:bg-black/5 hover:text-black dark:hover:bg-white/5 dark:hover:text-white"
|
||||
on:click={() => {
|
||||
onInsertToNote?.(visibleResponseContent);
|
||||
}}
|
||||
>
|
||||
{$i18n.t('Insert')}
|
||||
</button>
|
||||
</Tooltip>
|
||||
{/if}
|
||||
|
||||
{#if !readOnly && ($user?.role === 'admin' || ($user?.permissions?.chat?.tts ?? true))}
|
||||
<Tooltip content={$i18n.t('Read Aloud')} placement="bottom">
|
||||
<button
|
||||
|
||||
Reference in new issue
Block a user