|
|
@@ -7,6 +7,7 @@
|
|
|
import Cog6 from '$lib/components/icons/Cog6.svelte';
|
|
|
import ConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
|
|
|
import AddToolServerModal from '$lib/components/AddToolServerModal.svelte';
|
|
|
+ import WrenchAlt from '$lib/components/icons/WrenchAlt.svelte';
|
|
|
|
|
|
export let onDelete = () => {};
|
|
|
export let onSubmit = () => {};
|
|
|
@@ -41,33 +42,19 @@
|
|
|
/>
|
|
|
|
|
|
<div class="flex w-full gap-2 items-center">
|
|
|
- <Tooltip
|
|
|
- className="w-full relative"
|
|
|
- content={$i18n.t(`WebUI will make requests to "{{url}}"`, {
|
|
|
- url: `${connection?.url}/${connection?.path ?? 'openapi.json'}`
|
|
|
- })}
|
|
|
- placement="top-start"
|
|
|
- >
|
|
|
+ <Tooltip className="w-full relative" content={''} placement="top-start">
|
|
|
<div class="flex w-full">
|
|
|
- <div class="flex-1 relative">
|
|
|
- <input
|
|
|
- class=" outline-hidden w-full bg-transparent {!(connection?.config?.enable ?? true)
|
|
|
- ? 'opacity-50'
|
|
|
- : ''}"
|
|
|
- placeholder={$i18n.t('API Base URL')}
|
|
|
- bind:value={connection.url}
|
|
|
- autocomplete="off"
|
|
|
- />
|
|
|
+ <div
|
|
|
+ class="flex-1 relative flex gap-1.5 items-center {!(connection?.config?.enable ?? true)
|
|
|
+ ? 'opacity-50'
|
|
|
+ : ''}"
|
|
|
+ >
|
|
|
+ <WrenchAlt />
|
|
|
+ <div class=" capitalize outline-hidden w-full bg-transparent">
|
|
|
+ {connection?.info?.name ?? connection?.url}
|
|
|
+ <span class="text-gray-500">{connection?.info?.id}</span>
|
|
|
+ </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>
|
|
|
</Tooltip>
|
|
|
|