This commit is contained in:
Timothy Jaeryang Baek
2026-02-27 13:36:55 -06:00
parent 4731ccb73c
commit bbab64b53e
2 changed files with 23 additions and 21 deletions

View File

@@ -385,27 +385,27 @@
{/if}
{#if isImage}
<div class="relative w-full max-h-[70vh] overflow-hidden">
<div class="absolute top-2 right-2 z-10">
<Tooltip content={$i18n.t('Reset view')}>
<button
class="p-1.5 rounded-lg bg-white/80 dark:bg-gray-850/80 backdrop-blur-sm shadow-sm hover:bg-gray-100 dark:hover:bg-gray-800 transition text-gray-500 dark:text-gray-400"
on:click={resetImageView}
>
<Reset className="size-4" />
</button>
</Tooltip>
<div class="relative w-full max-h-[70vh] overflow-hidden">
<div class="absolute top-2 right-2 z-10">
<Tooltip content={$i18n.t('Reset view')}>
<button
class="p-1.5 rounded-lg bg-white/80 dark:bg-gray-850/80 backdrop-blur-sm shadow-sm hover:bg-gray-100 dark:hover:bg-gray-800 transition text-gray-500 dark:text-gray-400"
on:click={resetImageView}
>
<Reset className="size-4" />
</button>
</Tooltip>
</div>
<div use:initImagePanzoom>
<img
src={`${WEBUI_API_BASE_URL}/files/${item.id}/content`}
alt={item?.name ?? 'Image'}
class="w-full object-contain rounded-lg"
loading="lazy"
draggable="false"
/>
</div>
</div>
<div use:initImagePanzoom>
<img
src={`${WEBUI_API_BASE_URL}/files/${item.id}/content`}
alt={item?.name ?? 'Image'}
class="w-full object-contain rounded-lg"
loading="lazy"
draggable="false"
/>
</div>
</div>
{:else if selectedTab === ''}
{#if item?.file?.data}
{@const rawContent = (item?.file?.data?.content ?? '').trim() || 'No content'}

View File

@@ -224,7 +224,9 @@
{@const resultStr = String(parsedResult)}
{@const isTruncated = resultStr.length > RESULT_PREVIEW_LIMIT && !expandedResult}
<pre
class="text-xs text-gray-600 dark:text-gray-300 whitespace-pre-wrap break-words font-mono">{isTruncated ? resultStr.slice(0, RESULT_PREVIEW_LIMIT) : resultStr}</pre>
class="text-xs text-gray-600 dark:text-gray-300 whitespace-pre-wrap break-words font-mono">{isTruncated
? resultStr.slice(0, RESULT_PREVIEW_LIMIT)
: resultStr}</pre>
{#if isTruncated}
<button
class="mt-1 text-xs text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 transition"