mirror of
https://github.com/open-webui/open-webui
synced 2024-11-07 09:09:53 +00:00
✨ Better Practice
✨ Better Practice
This commit is contained in:
parent
8f49429228
commit
028eb7b351
@ -21,10 +21,8 @@
|
|||||||
let filteredModels = [];
|
let filteredModels = [];
|
||||||
|
|
||||||
$: filteredModels = $models
|
$: filteredModels = $models
|
||||||
.filter(
|
.filter((p) =>
|
||||||
(p) =>
|
p.name.toLowerCase().includes(prompt.toLowerCase().split(' ')?.at(0)?.substring(1) ?? '')
|
||||||
p.name.toLowerCase().includes(prompt.toLowerCase().split(' ')?.at(0)?.substring(1) ?? '') &&
|
|
||||||
p?.info?.meta?.hidden
|
|
||||||
)
|
)
|
||||||
.sort((a, b) => a.name.localeCompare(b.name));
|
.sort((a, b) => a.name.localeCompare(b.name));
|
||||||
|
|
||||||
@ -149,9 +147,9 @@
|
|||||||
<div class="m-1 overflow-y-auto p-1 rounded-r-lg space-y-0.5 scrollbar-hidden">
|
<div class="m-1 overflow-y-auto p-1 rounded-r-lg space-y-0.5 scrollbar-hidden">
|
||||||
{#each filteredModels as model, modelIdx}
|
{#each filteredModels as model, modelIdx}
|
||||||
<button
|
<button
|
||||||
class=" px-3 py-1.5 rounded-xl w-full text-left {modelIdx === selectedIdx
|
class="px-3 py-1.5 rounded-xl w-full text-left {modelIdx === selectedIdx
|
||||||
? ' bg-gray-50 dark:bg-gray-850 selected-command-option-button'
|
? 'bg-gray-50 dark:bg-gray-850 selected-command-option-button'
|
||||||
: ''}"
|
: ''} {model?.info?.meta?.hidden ? 'hidden' : ''}"
|
||||||
type="button"
|
type="button"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
confirmSelect(model);
|
confirmSelect(model);
|
||||||
@ -164,7 +162,7 @@
|
|||||||
<div class="flex font-medium text-black dark:text-gray-100 line-clamp-1">
|
<div class="flex font-medium text-black dark:text-gray-100 line-clamp-1">
|
||||||
<img
|
<img
|
||||||
src={model?.info?.meta?.profile_image_url ?? '/static/favicon.png'}
|
src={model?.info?.meta?.profile_image_url ?? '/static/favicon.png'}
|
||||||
alt="Model"
|
alt={model.name}
|
||||||
class="rounded-full size-6 items-center mr-2"
|
class="rounded-full size-6 items-center mr-2"
|
||||||
/>
|
/>
|
||||||
{model.name}
|
{model.name}
|
||||||
@ -172,7 +170,7 @@
|
|||||||
|
|
||||||
<!-- <div class=" text-xs text-gray-600 line-clamp-1">
|
<!-- <div class=" text-xs text-gray-600 line-clamp-1">
|
||||||
{doc.title}
|
{doc.title}
|
||||||
</div> -->
|
</div> -->
|
||||||
</button>
|
</button>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user