mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-05 11:07:55 -05:00
refac
This commit is contained in:
1 parent
b52bcff605
commit
e6a8dd052d
17 files changed
+3003
-3064
No files matched your search
@@ -13,6 +13,7 @@
|
||||
import DocumentArrowUp from '$lib/components/icons/DocumentArrowUp.svelte';
|
||||
import Link from '$lib/components/icons/Link.svelte';
|
||||
import Pencil from '$lib/components/icons/Pencil.svelte';
|
||||
import Plus from '$lib/components/icons/Plus.svelte';
|
||||
|
||||
type SplitCreateAction = {
|
||||
id: string;
|
||||
@@ -50,35 +51,43 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- Same circle as the + buttons on the folder page; a split pill when there are more ways to create. -->
|
||||
{#if visibleActions.length === 1}
|
||||
<button
|
||||
class="focus-ring ml-1 rounded-lg bg-base-50 px-2.5 py-1 text-xs text-base-900 transition ring-1 ring-base-200 hover:bg-base-100 dark:bg-base-850 dark:text-base-100 dark:ring-base-800 dark:hover:bg-base-800"
|
||||
class="focus-ring relative flex size-6.5 shrink-0 items-center justify-center rounded-full border border-base-100 bg-base-50/60 text-base-500 transition-colors hover:bg-base-100 hover:text-base-900 dark:border-base-850 dark:bg-base-850/50 dark:text-base-400 dark:hover:bg-base-850 dark:hover:text-base-0"
|
||||
type="button"
|
||||
aria-label={$i18n.t(label)}
|
||||
title={$i18n.t(label)}
|
||||
on:click={() => {
|
||||
runAction(primaryAction);
|
||||
}}
|
||||
>
|
||||
{$i18n.t(label)}
|
||||
<Plus className="size-3.5" strokeWidth="2" />
|
||||
</button>
|
||||
{:else if visibleActions.length > 1}
|
||||
<div
|
||||
class="ml-1 flex overflow-hidden rounded-lg bg-base-50 text-xs text-base-900 transition ring-1 ring-base-200 dark:bg-base-850 dark:text-base-100 dark:ring-base-800"
|
||||
class="flex h-6.5 shrink-0 items-center overflow-hidden rounded-full border border-base-100 bg-base-50/60 text-base-500 dark:border-base-850 dark:bg-base-850/50 dark:text-base-400"
|
||||
>
|
||||
<button
|
||||
class="focus-ring px-2.5 py-1 transition hover:bg-base-100 dark:hover:bg-base-800"
|
||||
class="focus-ring flex h-full w-6.5 items-center justify-center transition-colors hover:bg-base-100 hover:text-base-900 dark:hover:bg-base-850 dark:hover:text-base-0"
|
||||
type="button"
|
||||
aria-label={$i18n.t(label)}
|
||||
title={$i18n.t(label)}
|
||||
on:click={() => {
|
||||
runAction(primaryAction);
|
||||
}}
|
||||
>
|
||||
{$i18n.t(label)}
|
||||
<Plus className="size-3.5" strokeWidth="2" />
|
||||
</button>
|
||||
|
||||
<Dropdown bind:show={showMenu} align="end" sideOffset={6}>
|
||||
<button
|
||||
class="focus-ring flex items-center {($settings?.highContrastMode ?? false)
|
||||
? 'min-w-6 justify-center'
|
||||
: ''} border-l border-base-200 px-1.5 py-1 transition hover:bg-base-100 dark:border-base-800 dark:hover:bg-base-800"
|
||||
class="focus-ring flex h-full items-center justify-center border-l border-base-100 transition-colors hover:bg-base-100 hover:text-base-900 aria-expanded:bg-base-100 aria-expanded:text-base-900 dark:border-base-850 dark:hover:bg-base-850 dark:hover:text-base-0 dark:aria-expanded:bg-base-850 dark:aria-expanded:text-base-0 {$settings?.highContrastMode
|
||||
? 'w-6'
|
||||
: 'w-5'}"
|
||||
type="button"
|
||||
aria-label={$i18n.t('Open create menu')}
|
||||
title={$i18n.t('Open create menu')}
|
||||
>
|
||||
<ChevronDown className="size-2.5" strokeWidth="2.5" />
|
||||
</button>
|
||||
|
||||
Reference in new issue
Block a user