mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-10 03:27:57 +00:00
refac
This commit is contained in:
parent
27b48b70df
commit
db1ca1afab
3 changed files with 32 additions and 6 deletions
|
|
@ -37,7 +37,7 @@
|
|||
>
|
||||
<Tooltip content={$i18n.t('Add Content')}>
|
||||
<button
|
||||
class="p-1.5 rounded-xl bg-transparent transition text-xs flex items-center space-x-1 hover:text-gray-900 dark:hover:text-gray-100"
|
||||
class="px-1 py-1.5 rounded-xl bg-transparent transition text-xs flex items-center text-gray-500 hover:text-gray-900 dark:hover:text-gray-100"
|
||||
aria-label={$i18n.t('Add Content')}
|
||||
on:click={(e) => {
|
||||
e.stopPropagation();
|
||||
|
|
|
|||
|
|
@ -146,8 +146,8 @@
|
|||
|
||||
{#snippet sidebar()}
|
||||
<div class="flex h-full min-h-0 w-full flex-col">
|
||||
<div class="flex shrink-0 items-center gap-1 p-1.5">
|
||||
<Search className="ml-1 size-3.5 shrink-0 text-gray-400" /><input
|
||||
<div class="flex shrink-0 items-center p-1.5">
|
||||
<Search className="mx-1 size-3.5 shrink-0 text-gray-400" /><input
|
||||
aria-label={$i18n.t('Search Collection')}
|
||||
placeholder={$i18n.t('Search Collection')}
|
||||
bind:value={inputQuery}
|
||||
|
|
@ -158,7 +158,10 @@
|
|||
}}
|
||||
/>
|
||||
<Dropdown align="end"
|
||||
><button type="button" aria-label={$i18n.t('Filter and sort')} class="p-1 text-gray-500"
|
||||
><button
|
||||
type="button"
|
||||
aria-label={$i18n.t('Filter and sort')}
|
||||
class="flex h-7 w-6 shrink-0 items-center justify-center px-1 text-gray-500"
|
||||
><AdjustmentsHorizontal className="size-3.5" /></button
|
||||
>
|
||||
<div slot="content">
|
||||
|
|
|
|||
|
|
@ -656,7 +656,7 @@
|
|||
|
||||
{#snippet fileList()}
|
||||
<div class="h-full min-h-0 w-full overflow-auto p-1.5">
|
||||
<div class="mb-1 flex w-full items-center gap-1">
|
||||
<div class="mb-1 flex w-full items-center">
|
||||
<div class="min-w-0 flex-1">{@render version()}</div>
|
||||
{#if readOnly}
|
||||
<Tooltip content={$i18n.t('Read Only')}>
|
||||
|
|
@ -667,12 +667,13 @@
|
|||
>
|
||||
</Tooltip>
|
||||
{/if}
|
||||
|
||||
{#if !readOnly || canExport}
|
||||
<Dropdown closeOnSelect align="end">
|
||||
<button
|
||||
type="button"
|
||||
aria-label={$i18n.t('Actions')}
|
||||
class="flex h-7 w-7 shrink-0 items-center justify-center rounded-xl px-2 text-gray-500 transition hover:text-gray-900 dark:hover:text-gray-100"
|
||||
class="flex h-7 w-6 shrink-0 items-center justify-center rounded-xl px-1 text-gray-500 transition hover:text-gray-900 dark:hover:text-gray-100"
|
||||
>
|
||||
<EllipsisHorizontal className="size-4" />
|
||||
</button>
|
||||
|
|
@ -712,6 +713,28 @@
|
|||
</div>
|
||||
</Dropdown>
|
||||
{/if}
|
||||
{#if !readOnly}
|
||||
<Tooltip content={$i18n.t('New File')}>
|
||||
<button
|
||||
type="button"
|
||||
aria-label={$i18n.t('New File')}
|
||||
class="px-1 py-1.5 rounded-xl bg-transparent transition text-xs flex items-center text-gray-500 hover:text-gray-900 dark:hover:text-gray-100"
|
||||
on:click={() => startCreate('file')}
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="1.5"
|
||||
class="w-4 h-4"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<path stroke-linecap="round" d="M12 5v14M5 12h14" />
|
||||
</svg>
|
||||
</button>
|
||||
</Tooltip>
|
||||
{/if}
|
||||
</div>
|
||||
{#if $mobile && !showFileDrawer && loadError}
|
||||
<p role="alert" class="p-3 text-xs text-red-500">{loadError}</p>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue