open-webui/src/lib/components/notes/NoteEditor/Settings.svelte

47 lines
1.2 KiB
Svelte
Raw Normal View History

2025-07-07 15:26:12 +00:00
<script lang="ts">
import { getContext } from 'svelte';
const i18n = getContext('i18n');
import XMark from '$lib/components/icons/XMark.svelte';
import { models } from '$lib/stores';
export let show = false;
export let selectedModelId = '';
</script>
2025-07-07 15:32:41 +00:00
<div class="flex items-center mb-2 pt-1">
<div class=" -translate-x-1.5 flex items-center">
2025-07-07 15:26:12 +00:00
<button
2025-07-07 15:32:41 +00:00
class="p-0.5 bg-transparent transition rounded-lg"
2025-07-07 15:26:12 +00:00
on:click={() => {
show = !show;
}}
>
<XMark className="size-5" strokeWidth="2.5" />
</button>
</div>
2025-07-07 15:32:41 +00:00
<div class=" font-medium text-base flex items-center gap-1">
<div>
{$i18n.t('Settings')}
</div>
</div>
2025-07-07 15:26:12 +00:00
</div>
<div class="mt-1">
<div>
<div class=" text-xs font-medium mb-1">Model</div>
<div class="w-full">
<select class="w-full bg-transparent text-sm outline-hidden" bind:value={selectedModelId}>
<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>
{/each}
</select>
</div>
</div>
</div>