mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
refac
This commit is contained in:
parent
49bb1255c5
commit
9208a84185
1 changed files with 7 additions and 5 deletions
|
|
@ -61,18 +61,20 @@
|
|||
<Modal size="lg" bind:show>
|
||||
<div>
|
||||
<div class=" flex justify-between dark:text-gray-300 px-4.5 pt-3 pb-2">
|
||||
<div class=" text-lg font-medium self-center">
|
||||
<div class=" text-lg font-medium self-center flex items-center">
|
||||
{#if citation?.source?.name}
|
||||
{@const document = mergedDocuments?.[0]}
|
||||
{#if document?.metadata?.file_id || document.source?.url?.includes('http')}
|
||||
<Tooltip
|
||||
className="w-fit"
|
||||
content={$i18n.t('Open file')}
|
||||
content={document.source?.url?.includes('http')
|
||||
? $i18n.t('Open link')
|
||||
: $i18n.t('Open file')}
|
||||
placement="top-start"
|
||||
tippyOptions={{ duration: [500, 0] }}
|
||||
>
|
||||
<a
|
||||
class="hover:text-gray-500 dark:hover:text-gray-100 underline grow"
|
||||
class="hover:text-gray-500 dark:hover:text-gray-100 underline grow line-clamp-1"
|
||||
href={document?.metadata?.file_id
|
||||
? `${WEBUI_API_BASE_URL}/files/${document?.metadata?.file_id}/content${document?.metadata?.page !== undefined ? `#page=${document.metadata.page + 1}` : ''}`
|
||||
: document.source?.url?.includes('http')
|
||||
|
|
@ -100,9 +102,9 @@
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col md:flex-row w-full px-6 pb-5 md:space-x-4">
|
||||
<div class="flex flex-col md:flex-row w-full px-5 pb-5 md:space-x-4">
|
||||
<div
|
||||
class="flex flex-col w-full dark:text-gray-200 overflow-y-scroll max-h-[22rem] scrollbar-hidden gap-1"
|
||||
class="flex flex-col w-full dark:text-gray-200 overflow-y-scroll max-h-[22rem] scrollbar-thin gap-1"
|
||||
>
|
||||
{#each mergedDocuments as document, documentIdx}
|
||||
<div class="flex flex-col w-full gap-2">
|
||||
|
|
|
|||
Loading…
Reference in a new issue