mirror of
https://git.mirrors.martin98.com/https://github.com/open-webui/open-webui
synced 2025-08-17 06:35:59 +08:00
refac/fix: notes hide hidden models
This commit is contained in:
parent
61a9d9927d
commit
b34401a087
@ -180,7 +180,10 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const model = $models.find((model) => model.id === selectedModelId);
|
const model = $models
|
||||||
|
.filter((model) => model.id === selectedModelId && !(model?.info?.meta?.hidden ?? false))
|
||||||
|
.find((model) => model.id === selectedModelId);
|
||||||
|
|
||||||
if (!model) {
|
if (!model) {
|
||||||
selectedModelId = '';
|
selectedModelId = '';
|
||||||
return;
|
return;
|
||||||
@ -599,6 +602,16 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings,
|
|||||||
selectedModelId = '';
|
selectedModelId = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (selectedModelId) {
|
||||||
|
const model = $models
|
||||||
|
.filter((model) => model.id === selectedModelId && !(model?.info?.meta?.hidden ?? false))
|
||||||
|
.find((model) => model.id === selectedModelId);
|
||||||
|
|
||||||
|
if (!model) {
|
||||||
|
selectedModelId = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const dropzoneElement = document.getElementById('note-editor');
|
const dropzoneElement = document.getElementById('note-editor');
|
||||||
|
|
||||||
dropzoneElement?.addEventListener('dragover', onDragOver);
|
dropzoneElement?.addEventListener('dragover', onDragOver);
|
||||||
@ -660,7 +673,10 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings,
|
|||||||
class="w-full bg-transparent text-sm outline-hidden"
|
class="w-full bg-transparent text-sm outline-hidden"
|
||||||
bind:value={selectedModelId}
|
bind:value={selectedModelId}
|
||||||
>
|
>
|
||||||
{#each $models as model}
|
<option value="" class="bg-gray-50 dark:bg-gray-700" disabled>
|
||||||
|
{$i18n.t('Select a model')}
|
||||||
|
</option>
|
||||||
|
{#each $models.filter((model) => !(model?.info?.meta?.hidden ?? false)) as model}
|
||||||
<option value={model.id} class="bg-gray-50 dark:bg-gray-700">{model.name}</option>
|
<option value={model.id} class="bg-gray-50 dark:bg-gray-700">{model.name}</option>
|
||||||
{/each}
|
{/each}
|
||||||
</select>
|
</select>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user