mirror of
https://github.com/open-webui/computer.git
synced 2026-12-04 18:47:57 -05:00
refac
This commit is contained in:
1 parent
577836a086
commit
de7ca987a5
44 files changed
+1905
-713
No files matched your search
@@ -168,7 +168,7 @@
|
||||
id={`${fieldPrefix}-home`}
|
||||
type="text"
|
||||
value={draft.home || ''}
|
||||
placeholder="Optional"
|
||||
placeholder={$t('admin.optional')}
|
||||
autocomplete="off"
|
||||
spellcheck="false"
|
||||
oninput={(e) => (draft.home = e.currentTarget.value || null)}
|
||||
@@ -203,7 +203,7 @@
|
||||
id={`${fieldPrefix}-api-endpoint`}
|
||||
type="text"
|
||||
bind:value={draft.api_endpoint}
|
||||
placeholder="Optional"
|
||||
placeholder={$t('admin.optional')}
|
||||
autocomplete="off"
|
||||
spellcheck="false"
|
||||
class="block w-full bg-transparent text-[0.8125rem] text-gray-700 dark:text-gray-300 placeholder:text-gray-300 dark:placeholder:text-gray-700 outline-none py-0.5 font-mono"
|
||||
@@ -221,7 +221,7 @@
|
||||
id={`${fieldPrefix}-server-url`}
|
||||
type="text"
|
||||
bind:value={draft.server_url}
|
||||
placeholder="Optional"
|
||||
placeholder={$t('admin.optional')}
|
||||
autocomplete="off"
|
||||
spellcheck="false"
|
||||
class="block w-full bg-transparent text-[0.8125rem] text-gray-700 dark:text-gray-300 placeholder:text-gray-300 dark:placeholder:text-gray-700 outline-none py-0.5 font-mono"
|
||||
@@ -237,7 +237,7 @@
|
||||
id={`${fieldPrefix}-server-password`}
|
||||
type="password"
|
||||
bind:value={draft.server_password}
|
||||
placeholder="Optional"
|
||||
placeholder={$t('admin.optional')}
|
||||
autocomplete="off"
|
||||
spellcheck="false"
|
||||
class="block w-full bg-transparent text-[0.8125rem] text-gray-700 dark:text-gray-300 placeholder:text-gray-300 dark:placeholder:text-gray-700 outline-none py-0.5 font-mono"
|
||||
|
||||
@@ -310,7 +310,9 @@
|
||||
</div>
|
||||
|
||||
{#if profiles.length === 0}
|
||||
<p class="text-[0.8125rem] text-gray-400 dark:text-gray-600 py-4">No agent profiles</p>
|
||||
<p class="text-[0.8125rem] text-gray-400 dark:text-gray-600 py-4">
|
||||
{$t('admin.agentsNoProfiles')}
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<div class="mt-auto pt-6 flex items-center justify-between">
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Optional"
|
||||
placeholder={$t('connections.optional')}
|
||||
bind:value={formName}
|
||||
autofocus
|
||||
autocomplete="off"
|
||||
@@ -91,7 +91,9 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="w-28 shrink-0">
|
||||
<label class="text-[0.625rem] text-gray-400 dark:text-gray-600">Provider</label>
|
||||
<label class="text-[0.625rem] text-gray-400 dark:text-gray-600">
|
||||
{$t('connections.provider')}
|
||||
</label>
|
||||
<select
|
||||
bind:value={formProvider}
|
||||
class="block w-full bg-transparent text-[0.8125rem] text-gray-700 dark:text-gray-300 outline-none py-0.5 cursor-pointer"
|
||||
@@ -103,13 +105,15 @@
|
||||
</div>
|
||||
|
||||
{#if formProvider === 'openai'}
|
||||
<label class="text-[0.625rem] text-gray-400 dark:text-gray-600 mt-2">API Type</label>
|
||||
<label class="text-[0.625rem] text-gray-400 dark:text-gray-600 mt-2">
|
||||
{$t('connections.apiType')}
|
||||
</label>
|
||||
<select
|
||||
bind:value={formApiType}
|
||||
class="block w-full bg-transparent text-[0.8125rem] text-gray-700 dark:text-gray-300 outline-none py-0.5 cursor-pointer"
|
||||
>
|
||||
<option value="chat_completions">Chat Completions</option>
|
||||
<option value="responses">Responses</option>
|
||||
<option value="chat_completions">{$t('connections.chatCompletions')}</option>
|
||||
<option value="responses">{$t('connections.responses')}</option>
|
||||
</select>
|
||||
{/if}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Optional"
|
||||
placeholder={$t('connections.optional')}
|
||||
bind:value={formName}
|
||||
autofocus
|
||||
autocomplete="off"
|
||||
@@ -127,7 +127,9 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="w-28 shrink-0">
|
||||
<label class="text-[0.625rem] text-gray-400 dark:text-gray-600">Provider</label>
|
||||
<label class="text-[0.625rem] text-gray-400 dark:text-gray-600">
|
||||
{$t('connections.provider')}
|
||||
</label>
|
||||
<select
|
||||
bind:value={formProvider}
|
||||
class="block w-full bg-transparent text-[0.8125rem] text-gray-700 dark:text-gray-300 outline-none py-0.5 cursor-pointer"
|
||||
@@ -139,13 +141,15 @@
|
||||
</div>
|
||||
|
||||
{#if formProvider === 'openai'}
|
||||
<label class="text-[0.625rem] text-gray-400 dark:text-gray-600 mt-2">API Type</label>
|
||||
<label class="text-[0.625rem] text-gray-400 dark:text-gray-600 mt-2">
|
||||
{$t('connections.apiType')}
|
||||
</label>
|
||||
<select
|
||||
bind:value={formApiType}
|
||||
class="block w-full bg-transparent text-[0.8125rem] text-gray-700 dark:text-gray-300 outline-none py-0.5 cursor-pointer"
|
||||
>
|
||||
<option value="chat_completions">Chat Completions</option>
|
||||
<option value="responses">Responses</option>
|
||||
<option value="chat_completions">{$t('connections.chatCompletions')}</option>
|
||||
<option value="responses">{$t('connections.responses')}</option>
|
||||
</select>
|
||||
{/if}
|
||||
|
||||
|
||||
@@ -310,13 +310,13 @@ Files:
|
||||
)}
|
||||
<div class="mb-2">
|
||||
<span class="text-[0.625rem] text-gray-400 dark:text-gray-600 uppercase tracking-wide"
|
||||
>request params</span
|
||||
>{$t('models.requestParams')}</span
|
||||
>
|
||||
{#each rows as row, i}
|
||||
<div class="group/row flex items-center gap-1.5 h-6">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="key"
|
||||
placeholder={$t('models.paramKey')}
|
||||
bind:value={row.key}
|
||||
oninput={onInput}
|
||||
autocomplete="off"
|
||||
@@ -325,7 +325,7 @@ Files:
|
||||
/>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="value"
|
||||
placeholder={$t('models.paramValue')}
|
||||
bind:value={row.value}
|
||||
oninput={onInput}
|
||||
autocomplete="off"
|
||||
@@ -336,7 +336,7 @@ Files:
|
||||
type="button"
|
||||
onclick={() => onRemove(i)}
|
||||
class="shrink-0 text-gray-300 dark:text-gray-700 opacity-0 group-hover/row:opacity-100 hover:text-gray-500 dark:hover:text-gray-400 transition-colors duration-75"
|
||||
aria-label="Remove"
|
||||
aria-label={$t('common.remove')}
|
||||
>
|
||||
<Icon name="xmark" size={8} />
|
||||
</button>
|
||||
@@ -347,7 +347,7 @@ Files:
|
||||
onclick={onAdd}
|
||||
>
|
||||
<Icon name="plus" size={10} />
|
||||
<span>Add</span>
|
||||
<span>{$t('common.add')}</span>
|
||||
</button>
|
||||
</div>
|
||||
{/snippet}
|
||||
|
||||
Reference in new issue
Block a user