mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-10 03:27:57 +00:00
refac
This commit is contained in:
parent
186cd4bfa6
commit
3c97ec0b95
4 changed files with 17 additions and 10 deletions
|
|
@ -803,8 +803,8 @@
|
|||
aria-label={$i18n.t('Select how to split message text for TTS requests')}
|
||||
bind:value={TTS_SPLIT_ON}
|
||||
>
|
||||
{#each Object.values(TTS_RESPONSE_SPLIT) as split}
|
||||
<option value={split}>{$i18n.t(split.charAt(0).toUpperCase() + split.slice(1))}</option>
|
||||
{#each [{ value: TTS_RESPONSE_SPLIT.PUNCTUATION, label: $i18n.t('Punctuation') }, { value: TTS_RESPONSE_SPLIT.PARAGRAPHS, label: $i18n.t('Paragraphs') }, { value: TTS_RESPONSE_SPLIT.NONE, label: $i18n.t('None') }] as split}
|
||||
<option value={split.value}>{split.label}</option>
|
||||
{/each}
|
||||
</SettingsSelect>
|
||||
</AdminSettingRow>
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@
|
|||
<div class="px-5 pb-5 pt-4 dark:text-gray-200">
|
||||
<div class="mb-3 flex items-center justify-between gap-3">
|
||||
<div class="font-primary text-lg font-medium">
|
||||
{$i18n.t(editingKey ? 'Edit control' : 'Add control')}
|
||||
{editingKey ? $i18n.t('Edit control') : $i18n.t('Add control')}
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
|
|
@ -243,7 +243,7 @@
|
|||
: 'text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200'}"
|
||||
on:click={() => (display = mode as 'menu' | 'slider')}
|
||||
>
|
||||
{$i18n.t(mode === 'slider' ? 'Slider' : 'Menu')}
|
||||
{mode === 'slider' ? $i18n.t('Slider') : $i18n.t('Menu')}
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -313,10 +313,9 @@
|
|||
<button
|
||||
type="button"
|
||||
class="z-10 flex size-6 shrink-0 items-center justify-center rounded-md text-gray-500 hover:text-gray-900 dark:hover:text-gray-100"
|
||||
aria-label={$i18n.t(
|
||||
collapsed.has(group.id) ? 'Expand {{name}}' : 'Collapse {{name}}',
|
||||
{ name: group.name }
|
||||
)}
|
||||
aria-label={collapsed.has(group.id)
|
||||
? $i18n.t('Expand {{name}}', { name: group.name })
|
||||
: $i18n.t('Collapse {{name}}', { name: group.name })}
|
||||
aria-expanded={!!query || !collapsed.has(group.id)}
|
||||
on:click={() => {
|
||||
collapsed.has(group.id) ? collapsed.delete(group.id) : collapsed.add(group.id);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,15 @@
|
|||
export let onNavigate: () => void = () => {};
|
||||
|
||||
const NS = 1_000_000;
|
||||
const DAY_NAMES = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
||||
$: DAY_NAMES = [
|
||||
$i18n.t('Sun'),
|
||||
$i18n.t('Mon'),
|
||||
$i18n.t('Tue'),
|
||||
$i18n.t('Wed'),
|
||||
$i18n.t('Thu'),
|
||||
$i18n.t('Fri'),
|
||||
$i18n.t('Sat')
|
||||
];
|
||||
|
||||
$: calColorMap = calendars.reduce(
|
||||
(acc, c) => ({ ...acc, [c.id]: c.color }),
|
||||
|
|
@ -147,7 +155,7 @@
|
|||
<div class="grid grid-cols-7">
|
||||
{#each DAY_NAMES as day}
|
||||
<div class="px-2 py-1.5 text-xs text-gray-400 dark:text-gray-500 text-left truncate">
|
||||
{$i18n.t(day)}
|
||||
{day}
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue