mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac
This commit is contained in:
parent
6b69c4da0f
commit
06a6855f84
2 changed files with 15 additions and 1 deletions
|
|
@ -159,6 +159,20 @@
|
||||||
|
|
||||||
await tick();
|
await tick();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const onKeyDown = (e) => {
|
||||||
|
if (e.key === 'Enter') {
|
||||||
|
e.preventDefault();
|
||||||
|
select();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
onMount(() => {
|
||||||
|
window.addEventListener('keydown', onKeyDown);
|
||||||
|
});
|
||||||
|
|
||||||
|
onDestroy(() => {
|
||||||
|
window.removeEventListener('keydown', onKeyDown);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="px-2 text-xs text-gray-500 py-1">
|
<div class="px-2 text-xs text-gray-500 py-1">
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@
|
||||||
<Spinner className="size-4" />
|
<Spinner className="size-4" />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="font-medium line-clamp-1 flex-1">{decodeString(name)}</div>
|
<div class="font-medium line-clamp-1 flex-1 pr-1">{decodeString(name)}</div>
|
||||||
{#if size}
|
{#if size}
|
||||||
<div class="text-gray-500 text-xs capitalize shrink-0">{formatFileSize(size)}</div>
|
<div class="text-gray-500 text-xs capitalize shrink-0">{formatFileSize(size)}</div>
|
||||||
{:else}
|
{:else}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue