refac
This commit is contained in:
@@ -50,7 +50,14 @@
|
||||
}}
|
||||
>
|
||||
{#if copied}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-3.5 text-green-500">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="size-3.5 text-green-500"
|
||||
>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" />
|
||||
</svg>
|
||||
{:else}
|
||||
|
||||
@@ -61,23 +61,18 @@
|
||||
</button>
|
||||
</LinkPreview.Trigger>
|
||||
<LinkPreview.Portal>
|
||||
<LinkPreview.Content
|
||||
class="z-[999]"
|
||||
align="start"
|
||||
strategy="fixed"
|
||||
sideOffset={6}
|
||||
>
|
||||
<div class="bg-gray-50 dark:bg-gray-850 rounded-xl p-1 cursor-pointer">
|
||||
{#each token.citationIdentifiers ?? token.ids as identifier}
|
||||
{@const id =
|
||||
typeof identifier === 'string' ? parseInt(identifier.split('#')[0]) : identifier}
|
||||
<div class="">
|
||||
<Source id={identifier} title={sourceIds[id - 1]} {onClick} />
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</LinkPreview.Content>
|
||||
</LinkPreview.Portal>
|
||||
<LinkPreview.Content class="z-[999]" align="start" strategy="fixed" sideOffset={6}>
|
||||
<div class="bg-gray-50 dark:bg-gray-850 rounded-xl p-1 cursor-pointer">
|
||||
{#each token.citationIdentifiers ?? token.ids as identifier}
|
||||
{@const id =
|
||||
typeof identifier === 'string' ? parseInt(identifier.split('#')[0]) : identifier}
|
||||
<div class="">
|
||||
<Source id={identifier} title={sourceIds[id - 1]} {onClick} />
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</LinkPreview.Content>
|
||||
</LinkPreview.Portal>
|
||||
</LinkPreview.Root>
|
||||
{/if}
|
||||
{:else}
|
||||
|
||||
@@ -169,9 +169,10 @@
|
||||
$: model = $models.find((m) => m.id === message.model);
|
||||
|
||||
$: statusEntries = message?.statusHistory ?? [...(message?.status ? [message?.status] : [])];
|
||||
$: hasVisibleStatus = (model?.info?.meta?.capabilities?.status_updates ?? true)
|
||||
&& statusEntries.length > 0
|
||||
&& !(statusEntries.at(-1)?.hidden ?? false);
|
||||
$: hasVisibleStatus =
|
||||
(model?.info?.meta?.capabilities?.status_updates ?? true) &&
|
||||
statusEntries.length > 0 &&
|
||||
!(statusEntries.at(-1)?.hidden ?? false);
|
||||
|
||||
let edit = false;
|
||||
let editedContent = '';
|
||||
|
||||
@@ -135,7 +135,9 @@
|
||||
{#if !($settings?.chatBubble ?? true)}
|
||||
<div class={`shrink-0 ltr:mr-3 rtl:ml-3 mt-1`}>
|
||||
<ProfileImage
|
||||
src={user?.id ? `${WEBUI_API_BASE_URL}/users/${user.id}/profile/image` : `${WEBUI_BASE_URL}/static/favicon.png`}
|
||||
src={user?.id
|
||||
? `${WEBUI_API_BASE_URL}/users/${user.id}/profile/image`
|
||||
: `${WEBUI_BASE_URL}/static/favicon.png`}
|
||||
className={'size-8 user-message-profile-image'}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user