mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 12:55:19 +00:00
refac
This commit is contained in:
parent
5c2db102d0
commit
02f7c3258b
1 changed files with 18 additions and 15 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
import { models } from '$lib/stores';
|
import { models } from '$lib/stores';
|
||||||
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||||
export let query = '';
|
export let query = '';
|
||||||
|
|
||||||
export let command: (payload: { id: string; label: string }) => void;
|
export let command: (payload: { id: string; label: string }) => void;
|
||||||
|
|
@ -60,21 +61,23 @@
|
||||||
{$i18n.t('Models')}
|
{$i18n.t('Models')}
|
||||||
</div>
|
</div>
|
||||||
{#each filteredItems as item, i}
|
{#each filteredItems as item, i}
|
||||||
<button
|
<Tooltip content={item?.id} placement="top-start">
|
||||||
type="button"
|
<button
|
||||||
on:click={() => select(i)}
|
type="button"
|
||||||
on:mousemove={() => {
|
on:click={() => select(i)}
|
||||||
selectedIndex = i;
|
on:mousemove={() => {
|
||||||
}}
|
selectedIndex = i;
|
||||||
class="px-2.5 py-1.5 rounded-xl w-full text-left {i === selectedIndex
|
}}
|
||||||
? 'bg-gray-50 dark:bg-gray-800 selected-command-option-button'
|
class="px-2.5 py-1.5 rounded-xl w-full text-left {i === selectedIndex
|
||||||
: ''}"
|
? 'bg-gray-50 dark:bg-gray-800 selected-command-option-button'
|
||||||
data-selected={i === selectedIndex}
|
: ''}"
|
||||||
>
|
data-selected={i === selectedIndex}
|
||||||
<div class="truncate">
|
>
|
||||||
@{item.name}
|
<div class="truncate">
|
||||||
</div>
|
@{item.name}
|
||||||
</button>
|
</div>
|
||||||
|
</button>
|
||||||
|
</Tooltip>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue