This commit is contained in:
Timothy Jaeryang Baek 2026-10-09 17:51:06 +04:00
parent bf9d58674d
commit a86cac4daf
5 changed files with 16 additions and 14 deletions

View file

@ -174,25 +174,25 @@
>{includeContent ? '✓ ' : ''}{$i18n.t('Search file content')}</button
>
<hr class="border-gray-100 dark:border-gray-800" />
{#each [{ value: null, label: 'All' }, { value: 'created', label: 'Created by you' }, { value: 'shared', label: 'Shared with you' }] as option}<button
{#each [{ value: null, label: $i18n.t('All') }, { value: 'created', label: $i18n.t('Created by you') }, { value: 'shared', label: $i18n.t('Shared with you') }] as option}<button
type="button"
role="menuitemradio"
aria-checked={viewOption === option.value}
on:click={() => (viewOption = option.value)}
>{viewOption === option.value ? '✓ ' : ''}{$i18n.t(option.label)}</button
>{viewOption === option.value ? '✓ ' : ''}{option.label}</button
>{/each}
<hr class="border-gray-100 dark:border-gray-800" />
{#each [{ value: 'name', label: 'Name' }, { value: 'created_at', label: 'Created' }, { value: 'updated_at', label: 'Updated' }] as option}<button
{#each [{ value: 'name', label: $i18n.t('Name') }, { value: 'created_at', label: $i18n.t('Created') }, { value: 'updated_at', label: $i18n.t('Updated') }] as option}<button
type="button"
role="menuitemradio"
aria-checked={sortKey === option.value}
on:click={() => (sortKey = option.value)}
>{sortKey === option.value ? '✓ ' : ''}{$i18n.t(option.label)}</button
>{sortKey === option.value ? '✓ ' : ''}{option.label}</button
>{/each}
<button
type="button"
on:click={() => (direction = direction === 'asc' ? 'desc' : 'asc')}
>{$i18n.t(direction === 'asc' ? 'Ascending' : 'Descending')}</button
>{direction === 'asc' ? $i18n.t('Ascending') : $i18n.t('Descending')}</button
>
</DropdownMenu>
</div></Dropdown

View file

@ -156,7 +156,9 @@
>{/if}
{#if !directory && !renaming}<span class="shrink-0 text-[0.6875rem] text-gray-400"
>{pending
? $i18n.t(status === 'uploading' ? 'Uploading' : 'Processing')
? status === 'uploading'
? $i18n.t('Uploading')
: $i18n.t('Processing')
: status === 'failed'
? $i18n.t('Failed')
: file.meta?.size != null
@ -174,7 +176,7 @@
<div slot="content">
<DropdownMenu className="min-w-36">
{#if directory}<button type="button" on:click={onOpen}
>{$i18n.t(expanded ? 'Collapse' : 'Expand')}</button
>{expanded ? $i18n.t('Collapse') : $i18n.t('Expand')}</button
>{:else}<button type="button" on:click={onDownload}>{$i18n.t('Download')}</button>{/if}
{#if writeAccess}
{#if directory}<hr class="border-gray-100 dark:border-gray-800" />
@ -192,7 +194,7 @@
<button type="button" on:click={startRename}>{$i18n.t('Rename')}</button><button
type="button"
on:click={onDelete}
>{$i18n.t(directory ? 'Delete folder' : 'Remove from knowledge')}</button
>{directory ? $i18n.t('Delete folder') : $i18n.t('Remove from knowledge')}</button
>
{/if}
</DropdownMenu>

View file

@ -278,7 +278,7 @@
{#if state.mode === 'preview' && sourceToggle}<button
type="button"
on:click={() => (showRaw = !showRaw)}
>{$i18n.t(showRaw ? 'Rendered preview' : 'View source')}</button
>{showRaw ? $i18n.t('Rendered preview') : $i18n.t('View source')}</button
>{/if}</DropdownMenu
>
</div></Dropdown

View file

@ -325,7 +325,7 @@
<ConfirmDialog
bind:show={showDelete}
title={$i18n.t(deletion?.directory ? 'Delete folder?' : 'Remove file from knowledge?')}
title={deletion?.directory ? $i18n.t('Delete folder?') : $i18n.t('Remove file from knowledge?')}
on:confirm={remove}
>
{#if deletion?.directory}<label class="flex items-center gap-2 text-xs"
@ -375,7 +375,7 @@
on:drop={rootDrop}
title={$i18n.t('Drop here to move to root')}
>
{$i18n.t(query ? 'Search results' : 'All files')}
{query ? $i18n.t('Search results') : $i18n.t('All files')}
</div>
{#if query}{@render listing(null, results, 0, true)}{:else}{@render branch(null, 0)}{/if}
</div>
@ -457,6 +457,6 @@
{:else if !data.items.length && (search || !data.directories.length)}<p
class="px-2 py-1 text-xs text-gray-400"
>
{$i18n.t(search ? 'No results found' : 'No files')}
{search ? $i18n.t('No results found') : $i18n.t('No files')}
</p>{/if}
{/snippet}

View file

@ -396,7 +396,7 @@
<div class="flex min-h-7 shrink-0 items-center justify-between gap-2">
{#if modal}
<span class="text-xs text-gray-500"
>{$i18n.t(clone ? 'Clone Prompt' : 'Create Prompt')}</span
>{clone ? $i18n.t('Clone Prompt') : $i18n.t('Create Prompt')}</span
>
{:else}
<button
@ -651,7 +651,7 @@
class="flex h-7 shrink-0 items-center gap-1.5 rounded-lg bg-gray-900 px-2.5 text-xs text-white transition hover:bg-black disabled:opacity-60 dark:bg-gray-100 dark:text-gray-900 dark:hover:bg-white"
disabled={loading || !ready || historyLoading}
>
{$i18n.t(edit ? 'Save' : 'Save & Create')}{#if loading}<Spinner
{edit ? $i18n.t('Save') : $i18n.t('Save & Create')}{#if loading}<Spinner
className="size-3"
/>{/if}
</button>