refac: external tool server view
This commit is contained in:
@@ -83,7 +83,7 @@
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-col gap-1.5">
|
<div class="flex flex-col gap-1">
|
||||||
{#each servers as server, idx}
|
{#each servers as server, idx}
|
||||||
<Connection
|
<Connection
|
||||||
bind:connection={server}
|
bind:connection={server}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
import Cog6 from '$lib/components/icons/Cog6.svelte';
|
import Cog6 from '$lib/components/icons/Cog6.svelte';
|
||||||
import ConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
|
import ConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
|
||||||
import AddToolServerModal from '$lib/components/AddToolServerModal.svelte';
|
import AddToolServerModal from '$lib/components/AddToolServerModal.svelte';
|
||||||
|
import WrenchAlt from '$lib/components/icons/WrenchAlt.svelte';
|
||||||
|
|
||||||
export let onDelete = () => {};
|
export let onDelete = () => {};
|
||||||
export let onSubmit = () => {};
|
export let onSubmit = () => {};
|
||||||
@@ -41,33 +42,19 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="flex w-full gap-2 items-center">
|
<div class="flex w-full gap-2 items-center">
|
||||||
<Tooltip
|
<Tooltip className="w-full relative" content={''} placement="top-start">
|
||||||
className="w-full relative"
|
|
||||||
content={$i18n.t(`WebUI will make requests to "{{url}}"`, {
|
|
||||||
url: `${connection?.url}/${connection?.path ?? 'openapi.json'}`
|
|
||||||
})}
|
|
||||||
placement="top-start"
|
|
||||||
>
|
|
||||||
<div class="flex w-full">
|
<div class="flex w-full">
|
||||||
<div class="flex-1 relative">
|
<div
|
||||||
<input
|
class="flex-1 relative flex gap-1.5 items-center {!(connection?.config?.enable ?? true)
|
||||||
class=" outline-hidden w-full bg-transparent {!(connection?.config?.enable ?? true)
|
? 'opacity-50'
|
||||||
? 'opacity-50'
|
: ''}"
|
||||||
: ''}"
|
>
|
||||||
placeholder={$i18n.t('API Base URL')}
|
<WrenchAlt />
|
||||||
bind:value={connection.url}
|
<div class=" capitalize outline-hidden w-full bg-transparent">
|
||||||
autocomplete="off"
|
{connection?.info?.name ?? connection?.url}
|
||||||
/>
|
<span class="text-gray-500">{connection?.info?.id}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if (connection?.auth_type ?? 'bearer') === 'bearer'}
|
|
||||||
<SensitiveInput
|
|
||||||
inputClassName=" outline-hidden bg-transparent w-full"
|
|
||||||
placeholder={$i18n.t('API Key')}
|
|
||||||
bind:value={connection.key}
|
|
||||||
required={false}
|
|
||||||
/>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user