mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-26 01:10:37 -04:00
refac
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
export let rows = 3;
|
||||
export let required = false;
|
||||
export let disabled = false;
|
||||
export let showControls = true;
|
||||
$: translated = translations?.[locale]?.[field] ?? '';
|
||||
$: fallback = resolveLocalizedString(value, translations, locale, field);
|
||||
const update = (next: string) => {
|
||||
@@ -52,7 +53,7 @@
|
||||
on:input={(e) => update(e.currentTarget.value)}
|
||||
/>
|
||||
{/if}
|
||||
{#if locale}
|
||||
{#if locale && showControls}
|
||||
<div
|
||||
class="mt-1 flex flex-wrap items-center gap-3 text-[0.6875rem] text-gray-400 dark:text-gray-600"
|
||||
>
|
||||
|
||||
@@ -127,6 +127,7 @@
|
||||
<Tooltip content={$i18n.t('e.g. Code Review Guidelines')} placement="top-start">
|
||||
<LocalizedField
|
||||
placeholder={$i18n.t('Skill Name')}
|
||||
showControls={false}
|
||||
bind:value={name}
|
||||
bind:translations={meta.i18n}
|
||||
{locale}
|
||||
@@ -165,6 +166,7 @@
|
||||
>
|
||||
<LocalizedField
|
||||
placeholder={$i18n.t('Skill Description')}
|
||||
showControls={false}
|
||||
bind:value={description}
|
||||
bind:translations={meta.i18n}
|
||||
{locale}
|
||||
|
||||
@@ -251,6 +251,7 @@ class Tools:
|
||||
<Tooltip content={$i18n.t('e.g. My Tools')} placement="top-start">
|
||||
<LocalizedField
|
||||
placeholder={$i18n.t('Tool Name')}
|
||||
showControls={false}
|
||||
bind:value={name}
|
||||
bind:translations={meta.i18n}
|
||||
{locale}
|
||||
@@ -288,6 +289,7 @@ class Tools:
|
||||
>
|
||||
<LocalizedField
|
||||
placeholder={$i18n.t('Tool Description')}
|
||||
showControls={false}
|
||||
bind:value={meta.description}
|
||||
bind:translations={meta.i18n}
|
||||
{locale}
|
||||
|
||||
Reference in New Issue
Block a user