mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-16 09:41:23 +00:00
refac
This commit is contained in:
parent
91241306e2
commit
9959fc95a2
6 changed files with 76 additions and 70 deletions
|
|
@ -229,7 +229,7 @@
|
|||
on:mousemove={() => {
|
||||
selectedIndex = i;
|
||||
}}
|
||||
class="flex h-6 w-full items-center gap-2 rounded-xl px-2 text-left text-xs transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {i ===
|
||||
class="flex h-6 w-full items-center gap-2 rounded-xl px-2 text-left text-[0.8125rem] transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {i ===
|
||||
selectedIndex
|
||||
? 'app-interactive-active selected-command-option-button'
|
||||
: ''}"
|
||||
|
|
@ -250,7 +250,11 @@
|
|||
allowExternal
|
||||
className="size-4 shrink-0 rounded-sm!"
|
||||
/>
|
||||
{:else}<Grid className="app-icon-muted size-4 shrink-0" />{/if}
|
||||
{:else}
|
||||
<div class="app-icon-muted flex w-4 shrink-0 items-center justify-center">
|
||||
<Grid className="size-3.5" />
|
||||
</div>
|
||||
{/if}
|
||||
{:else if item.type === 'model'}
|
||||
<img
|
||||
src={`${WEBUI_API_BASE_URL}/models/model/profile/image?id=${item.id}&lang=${$i18n.language}`}
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@
|
|||
{/if}
|
||||
|
||||
<button
|
||||
class="flex h-6 w-full max-w-full items-center justify-between overflow-hidden rounded-xl px-2 text-left text-xs transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {itemIdx ===
|
||||
class="flex h-6 w-full max-w-full items-center justify-between overflow-hidden rounded-xl px-2 text-left text-[0.8125rem] transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {itemIdx ===
|
||||
selectedIdx
|
||||
? 'app-interactive-active selected-command-option-button'
|
||||
: ''}"
|
||||
|
|
@ -326,7 +326,7 @@
|
|||
{@const itemIdx = knowledgeResults.length + modelIdx}
|
||||
<Tooltip content={model.id} placement="top-start">
|
||||
<button
|
||||
class="flex h-6 w-full items-center rounded-xl px-2 text-left text-xs transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {itemIdx ===
|
||||
class="flex h-6 w-full items-center rounded-xl px-2 text-left text-[0.8125rem] transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {itemIdx ===
|
||||
selectedIdx
|
||||
? 'app-interactive-active selected-command-option-button'
|
||||
: ''}"
|
||||
|
|
|
|||
|
|
@ -64,15 +64,15 @@
|
|||
</script>
|
||||
|
||||
{#if filteredItems.length > 0}
|
||||
<div class="px-2 py-1 text-[0.6875rem] text-gray-500 dark:text-gray-400">
|
||||
<div class="app-muted mb-0.5 px-2 pt-1 pb-0.5 text-[0.625rem] leading-none">
|
||||
{$i18n.t('Emojis')}
|
||||
</div>
|
||||
|
||||
{#each filteredItems as emoji, emojiIdx}
|
||||
<button
|
||||
class="flex h-[1.6875rem] w-full items-center rounded-xl px-2 text-left text-[0.8125rem] hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {emojiIdx ===
|
||||
class="flex h-6 w-full items-center rounded-xl px-2 text-left text-[0.8125rem] transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {emojiIdx ===
|
||||
selectedIdx
|
||||
? 'bg-gray-50/40 dark:bg-gray-800/40 selected-command-option-button'
|
||||
? 'app-interactive-active selected-command-option-button'
|
||||
: ''}"
|
||||
type="button"
|
||||
on:click={() => {
|
||||
|
|
@ -84,14 +84,16 @@
|
|||
on:focus={() => {}}
|
||||
data-selected={emojiIdx === selectedIdx}
|
||||
>
|
||||
<div class="flex min-w-0 items-center gap-2 text-black dark:text-gray-100">
|
||||
<img
|
||||
src="{WEBUI_BASE_URL}/assets/emojis/{emoji.name.toLowerCase()}.svg"
|
||||
alt={emoji.name}
|
||||
class="size-4.5 flex-shrink-0"
|
||||
loading="lazy"
|
||||
/>
|
||||
<div class="truncate text-[0.8125rem]">
|
||||
<div class="flex w-full min-w-0 items-center gap-2">
|
||||
<div class="flex w-4 shrink-0 items-center justify-center">
|
||||
<img
|
||||
src="{WEBUI_BASE_URL}/assets/emojis/{emoji.name.toLowerCase()}.svg"
|
||||
alt={emoji.name}
|
||||
class="size-3.5"
|
||||
loading="lazy"
|
||||
/>
|
||||
</div>
|
||||
<div class="truncate min-w-0 flex-1">
|
||||
:{emoji.shortCodes[0]}:
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@
|
|||
|
||||
{#if !['youtube', 'web'].includes(item.type)}
|
||||
<button
|
||||
class="flex h-6 w-full items-center justify-between rounded-xl px-2 text-left text-xs transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {idx ===
|
||||
class="flex h-6 w-full items-center justify-between rounded-xl px-2 text-left text-[0.8125rem] transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {idx ===
|
||||
selectedIdx
|
||||
? 'app-interactive-active selected-command-option-button'
|
||||
: ''}"
|
||||
|
|
@ -210,7 +210,7 @@
|
|||
|
||||
{#if webUploadEnabled && isYoutubeUrl(query)}
|
||||
<button
|
||||
class="flex h-6 w-full items-center rounded-xl app-interactive-active px-2 text-left text-xs transition-colors duration-75 selected-command-option-button"
|
||||
class="flex h-6 w-full items-center rounded-xl app-interactive-active px-2 text-left text-[0.8125rem] transition-colors duration-75 selected-command-option-button"
|
||||
type="button"
|
||||
data-selected={selectedIdx === filteredItems.findIndex((i) => i.type === 'youtube')}
|
||||
on:click={() => {
|
||||
|
|
@ -242,7 +242,7 @@
|
|||
</button>
|
||||
{:else if webUploadEnabled && query.startsWith('http')}
|
||||
<button
|
||||
class="flex h-6 w-full items-center rounded-xl app-interactive-active px-2 text-left text-xs transition-colors duration-75 selected-command-option-button"
|
||||
class="flex h-6 w-full items-center rounded-xl app-interactive-active px-2 text-left text-[0.8125rem] transition-colors duration-75 selected-command-option-button"
|
||||
type="button"
|
||||
data-selected={selectedIdx === filteredItems.findIndex((i) => i.type === 'web')}
|
||||
on:click={() => {
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@
|
|||
tippyOptions={{ maxWidth: '20rem' }}
|
||||
>
|
||||
<button
|
||||
class="flex h-6 w-full items-center rounded-xl px-2 text-left text-xs transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {skillIdx ===
|
||||
class="flex h-6 w-full items-center rounded-xl px-2 text-left text-[0.8125rem] transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {skillIdx ===
|
||||
selectedIdx
|
||||
? 'app-interactive-active selected-command-option-button'
|
||||
: ''}"
|
||||
|
|
|
|||
|
|
@ -192,8 +192,8 @@
|
|||
<button
|
||||
type="button"
|
||||
aria-label={$i18n.t('Temporary: toggle temporary chat for this new chat.')}
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-xs text-left transition-colors duration-75
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active' : ''}"
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-[0.8125rem] text-left transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active selected-command-option-button' : ''}"
|
||||
on:mousedown={(e) => e.preventDefault()}
|
||||
on:click={() => {
|
||||
onSelect(item);
|
||||
|
|
@ -211,9 +211,9 @@
|
|||
<ChatBubbleDotted className="size-3.5" strokeWidth="1.6" />
|
||||
{/if}
|
||||
</span>
|
||||
<span class="flex-1 min-w-0 flex items-baseline gap-1.5 overflow-hidden">
|
||||
<span class="truncate">{$i18n.t('Temporary')}</span>
|
||||
<span class="app-muted text-[0.625rem] truncate shrink-0">
|
||||
<span class="flex-1 min-w-0 flex items-center gap-2 overflow-hidden">
|
||||
<span class="min-w-0 flex-1 truncate">{$i18n.t('Temporary')}</span>
|
||||
<span class="app-muted max-w-24 shrink-0 truncate text-[0.625rem]">
|
||||
{temporaryEnabled ? $i18n.t('On') : $i18n.t('Off')}
|
||||
</span>
|
||||
</span>
|
||||
|
|
@ -227,8 +227,8 @@
|
|||
<button
|
||||
type="button"
|
||||
aria-label={$i18n.t('Compact: shorten older messages so this chat can keep going.')}
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-xs text-left transition-colors duration-75
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active' : ''} disabled:opacity-50"
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-[0.8125rem] text-left transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active selected-command-option-button' : ''} disabled:opacity-50"
|
||||
disabled={compactDisabled}
|
||||
on:mousedown={(e) => e.preventDefault()}
|
||||
on:click={() => {
|
||||
|
|
@ -268,10 +268,10 @@
|
|||
</svg>
|
||||
{/if}
|
||||
</span>
|
||||
<span class="flex-1 min-w-0 flex items-baseline gap-1.5 overflow-hidden">
|
||||
<span class="truncate">{$i18n.t('Compact')}</span>
|
||||
<span class="flex-1 min-w-0 flex items-center gap-2 overflow-hidden">
|
||||
<span class="min-w-0 flex-1 truncate">{$i18n.t('Compact')}</span>
|
||||
{#if contextHasThreshold}
|
||||
<span class="app-muted text-[0.625rem] truncate shrink-0">
|
||||
<span class="app-muted max-w-24 shrink-0 truncate text-[0.625rem]">
|
||||
{$i18n.t('{{percent}}% full', { percent: contextCirclePercent })}
|
||||
</span>
|
||||
{/if}
|
||||
|
|
@ -283,8 +283,8 @@
|
|||
<button
|
||||
type="button"
|
||||
aria-label={$i18n.t('Fork: fork the current chat branch into a new chat.')}
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-xs text-left transition-colors duration-75
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active' : ''} disabled:opacity-50"
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-[0.8125rem] text-left transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active selected-command-option-button' : ''} disabled:opacity-50"
|
||||
disabled={forkDisabled}
|
||||
on:mousedown={(e) => e.preventDefault()}
|
||||
on:click={() => {
|
||||
|
|
@ -316,9 +316,9 @@
|
|||
<path d="M17 14L20 17L17 20" />
|
||||
</svg>
|
||||
</span>
|
||||
<span class="flex-1 min-w-0 flex items-baseline gap-1.5 overflow-hidden">
|
||||
<span class="truncate">{$i18n.t('Fork')}</span>
|
||||
<span class="app-muted text-[0.625rem] truncate shrink-0">
|
||||
<span class="flex-1 min-w-0 flex items-center gap-2 overflow-hidden">
|
||||
<span class="min-w-0 flex-1 truncate">{$i18n.t('Fork')}</span>
|
||||
<span class="app-muted max-w-24 shrink-0 truncate text-[0.625rem]">
|
||||
{$i18n.t('Current branch')}
|
||||
</span>
|
||||
</span>
|
||||
|
|
@ -329,8 +329,8 @@
|
|||
<button
|
||||
type="button"
|
||||
aria-label={$i18n.t('Status: check what is running in this chat.')}
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-xs text-left transition-colors duration-75
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active' : ''}"
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-[0.8125rem] text-left transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active selected-command-option-button' : ''}"
|
||||
on:mousedown={(e) => e.preventDefault()}
|
||||
on:click={() => {
|
||||
onSelect(item);
|
||||
|
|
@ -356,9 +356,9 @@
|
|||
<path d="M3.34 19a10 10 0 1 1 17.32 0" />
|
||||
</svg>
|
||||
</span>
|
||||
<span class="flex-1 min-w-0 flex items-baseline gap-1.5 overflow-hidden">
|
||||
<span class="truncate">{$i18n.t('Status')}</span>
|
||||
<span class="app-muted text-[0.625rem] truncate shrink-0">
|
||||
<span class="flex-1 min-w-0 flex items-center gap-2 overflow-hidden">
|
||||
<span class="min-w-0 flex-1 truncate">{$i18n.t('Status')}</span>
|
||||
<span class="app-muted max-w-24 shrink-0 truncate text-[0.625rem]">
|
||||
{$i18n.t('Check what is running in this chat.')}
|
||||
</span>
|
||||
</span>
|
||||
|
|
@ -369,8 +369,8 @@
|
|||
<button
|
||||
type="button"
|
||||
aria-label={$i18n.t('Model: show or switch the current model.')}
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-xs text-left transition-colors duration-75
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active' : ''}"
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-[0.8125rem] text-left transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active selected-command-option-button' : ''}"
|
||||
on:mousedown={(e) => e.preventDefault()}
|
||||
on:click={() => {
|
||||
onSelect(item);
|
||||
|
|
@ -384,9 +384,9 @@
|
|||
<span class="app-icon-muted flex items-center justify-center w-4 shrink-0">
|
||||
<Sparkles className="size-3.5" />
|
||||
</span>
|
||||
<span class="flex-1 min-w-0 flex items-baseline gap-1.5 overflow-hidden">
|
||||
<span class="truncate">{$i18n.t('Model')}</span>
|
||||
<span class="app-muted text-[0.625rem] truncate shrink-0">/model</span>
|
||||
<span class="flex-1 min-w-0 flex items-center gap-2 overflow-hidden">
|
||||
<span class="min-w-0 flex-1 truncate">{$i18n.t('Model')}</span>
|
||||
<span class="app-muted max-w-24 shrink-0 truncate text-[0.625rem]">/model</span>
|
||||
</span>
|
||||
</button>
|
||||
</Tooltip>
|
||||
|
|
@ -394,8 +394,8 @@
|
|||
<button
|
||||
type="button"
|
||||
aria-label={$i18n.t('Compare text')}
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-xs text-left transition-colors duration-75
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active' : ''}"
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-[0.8125rem] text-left transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active selected-command-option-button' : ''}"
|
||||
on:mousedown={(e) => e.preventDefault()}
|
||||
on:click={() => onSelect(item)}
|
||||
on:mouseenter={() => (selectedIdx = commandIdx)}
|
||||
|
|
@ -417,9 +417,9 @@
|
|||
<path d="M12 4v16M5.5 12h4M14.5 12h4M16.5 10v4" />
|
||||
</svg>
|
||||
</span>
|
||||
<span class="flex-1 min-w-0 flex items-baseline gap-1.5 overflow-hidden">
|
||||
<span class="truncate">{$i18n.t('Compare text')}</span>
|
||||
<span class="app-muted text-[0.625rem] truncate shrink-0">/compare</span>
|
||||
<span class="flex-1 min-w-0 flex items-center gap-2 overflow-hidden">
|
||||
<span class="min-w-0 flex-1 truncate">{$i18n.t('Compare text')}</span>
|
||||
<span class="app-muted max-w-24 shrink-0 truncate text-[0.625rem]">/compare</span>
|
||||
</span>
|
||||
</button>
|
||||
{:else if item.data.id === 'skills:create'}
|
||||
|
|
@ -430,8 +430,8 @@
|
|||
<button
|
||||
type="button"
|
||||
aria-label={$i18n.t('Create skill: create a reusable terminal skill from this chat.')}
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-xs text-left transition-colors duration-75
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active' : ''}"
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-[0.8125rem] text-left transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active selected-command-option-button' : ''}"
|
||||
on:mousedown={(e) => e.preventDefault()}
|
||||
on:click={() => {
|
||||
onSelect(item);
|
||||
|
|
@ -445,9 +445,9 @@
|
|||
<span class="app-icon-muted flex items-center justify-center w-4 shrink-0">
|
||||
<Plus className="size-3.5" />
|
||||
</span>
|
||||
<span class="flex-1 min-w-0 flex items-baseline gap-1.5 overflow-hidden">
|
||||
<span class="truncate">{$i18n.t('Create skill')}</span>
|
||||
<span class="app-muted text-[0.625rem] truncate shrink-0">/skills:create</span>
|
||||
<span class="flex-1 min-w-0 flex items-center gap-2 overflow-hidden">
|
||||
<span class="min-w-0 flex-1 truncate">{$i18n.t('Create skill')}</span>
|
||||
<span class="app-muted max-w-24 shrink-0 truncate text-[0.625rem]">/skills:create</span>
|
||||
</span>
|
||||
</button>
|
||||
</Tooltip>
|
||||
|
|
@ -456,8 +456,8 @@
|
|||
<button
|
||||
type="button"
|
||||
aria-label={$i18n.t('Settings: open settings.')}
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-xs text-left transition-colors duration-75
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active' : ''}"
|
||||
class="slash-command-row flex items-center gap-2 w-full h-6 px-2 rounded-xl text-[0.8125rem] text-left transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40
|
||||
{commandIdx === selectedIdx ? 'app-interactive-active selected-command-option-button' : ''}"
|
||||
on:mousedown={(e) => e.preventDefault()}
|
||||
on:click={() => {
|
||||
onSelect(item);
|
||||
|
|
@ -471,9 +471,9 @@
|
|||
<span class="app-icon-muted flex items-center justify-center w-4 shrink-0">
|
||||
<Knobs className="size-3.5" />
|
||||
</span>
|
||||
<span class="flex-1 min-w-0 flex items-baseline gap-1.5 overflow-hidden">
|
||||
<span class="truncate">{$i18n.t('Settings')}</span>
|
||||
<span class="app-muted text-[0.625rem] truncate shrink-0">/settings</span>
|
||||
<span class="flex-1 min-w-0 flex items-center gap-2 overflow-hidden">
|
||||
<span class="min-w-0 flex-1 truncate">{$i18n.t('Settings')}</span>
|
||||
<span class="app-muted max-w-24 shrink-0 truncate text-[0.625rem]">/settings</span>
|
||||
</span>
|
||||
</button>
|
||||
</Tooltip>
|
||||
|
|
@ -482,7 +482,7 @@
|
|||
{/if}
|
||||
|
||||
{#if filteredPrompts.length > 0}
|
||||
<div class="px-2 py-1 text-[0.6875rem] text-gray-500 dark:text-gray-400">
|
||||
<div class="app-muted mb-0.5 px-2 pt-1 pb-0.5 text-[0.625rem] leading-none">
|
||||
{$i18n.t('Prompts')}
|
||||
</div>
|
||||
|
||||
|
|
@ -490,9 +490,9 @@
|
|||
{@const itemIdx = commandItems.length + promptIdx}
|
||||
<Tooltip content={promptItem.name} placement="top-start">
|
||||
<button
|
||||
class="flex h-[1.6875rem] w-full items-center gap-1.5 rounded-xl px-2 text-left text-[0.8125rem] hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {itemIdx ===
|
||||
class="flex h-6 w-full items-center gap-2 rounded-xl px-2 text-left text-[0.8125rem] transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {itemIdx ===
|
||||
selectedIdx
|
||||
? 'bg-gray-50/40 dark:bg-gray-800/40 selected-command-option-button'
|
||||
? 'app-interactive-active selected-command-option-button'
|
||||
: ''}"
|
||||
type="button"
|
||||
on:click={() => {
|
||||
|
|
@ -504,11 +504,11 @@
|
|||
on:focus={() => {}}
|
||||
data-selected={itemIdx === selectedIdx}
|
||||
>
|
||||
<span class="shrink-0 font-normal text-black dark:text-gray-100">
|
||||
<span class="min-w-0 flex-1 truncate font-normal">
|
||||
{promptItem.command}
|
||||
</span>
|
||||
|
||||
<span class="min-w-0 truncate text-xs text-gray-500 dark:text-gray-400">
|
||||
<span class="app-muted max-w-24 shrink-0 truncate text-[0.625rem]">
|
||||
{promptItem.name}
|
||||
</span>
|
||||
</button>
|
||||
|
|
@ -517,7 +517,7 @@
|
|||
{/if}
|
||||
|
||||
{#if skills.length > 0}
|
||||
<div class="px-2 py-1 text-[0.6875rem] text-gray-500 dark:text-gray-400">
|
||||
<div class="app-muted mb-0.5 px-2 pt-1 pb-0.5 text-[0.625rem] leading-none">
|
||||
{$i18n.t('Skills')}
|
||||
</div>
|
||||
|
||||
|
|
@ -530,9 +530,9 @@
|
|||
tippyOptions={{ maxWidth: '20rem' }}
|
||||
>
|
||||
<button
|
||||
class="flex h-[1.6875rem] w-full items-center rounded-xl px-2 text-left text-[0.8125rem] hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {itemIdx ===
|
||||
class="flex h-6 w-full items-center rounded-xl px-2 text-left text-[0.8125rem] transition-colors duration-75 hover:bg-gray-50/40 dark:hover:bg-gray-800/40 {itemIdx ===
|
||||
selectedIdx
|
||||
? 'bg-gray-50/40 dark:bg-gray-800/40 selected-command-option-button'
|
||||
? 'app-interactive-active selected-command-option-button'
|
||||
: ''}"
|
||||
type="button"
|
||||
on:click={() => {
|
||||
|
|
@ -544,14 +544,14 @@
|
|||
on:focus={() => {}}
|
||||
data-selected={itemIdx === selectedIdx}
|
||||
>
|
||||
<div class="flex w-full min-w-0 items-center text-black dark:text-gray-100">
|
||||
<div class="mr-2 flex size-4.5 shrink-0 items-center justify-center">
|
||||
<div class="flex w-full min-w-0 items-center gap-2">
|
||||
<div class="app-icon-muted flex w-4 shrink-0 items-center justify-center">
|
||||
<Cube className="size-3.5" />
|
||||
</div>
|
||||
<div class="truncate min-w-0 flex-1">
|
||||
{resolveLocalizedResource(skill, $i18n.language)}
|
||||
</div>
|
||||
<div class="ml-2 max-w-24 shrink-0 truncate text-xs text-gray-500 dark:text-gray-400">
|
||||
<div class="app-muted max-w-24 shrink-0 truncate text-[0.625rem]">
|
||||
{skill.source === 'terminal' ? $i18n.t('Terminal') : skill.id}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue