From daf2295932d6ba5e0f4a176c17f61d7390974055 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sat, 12 Sep 2026 19:23:27 -0400 Subject: [PATCH] refac --- .../chat/Settings/Connections.svelte | 45 ++++++----- .../chat/Settings/Integrations.svelte | 76 +++++++++---------- .../Settings/Integrations/Terminals.svelte | 23 ++++-- 3 files changed, 81 insertions(+), 63 deletions(-) diff --git a/src/lib/components/chat/Settings/Connections.svelte b/src/lib/components/chat/Settings/Connections.svelte index dac2adb504..675f791ed7 100644 --- a/src/lib/components/chat/Settings/Connections.svelte +++ b/src/lib/components/chat/Settings/Connections.svelte @@ -9,7 +9,6 @@ import Tooltip from '$lib/components/common/Tooltip.svelte'; import Plus from '$lib/components/icons/Plus.svelte'; import Connection from './Connections/Connection.svelte'; - import UserSettingSection from './UserSettingSection.svelte'; import AddConnectionModal from '$lib/components/AddConnectionModal.svelte'; @@ -75,17 +74,22 @@ >

{$i18n.t('Connections')}

-
+
{#if config !== null} - -
-
- {$i18n.t('Connect to your own OpenAI compatible API endpoints.')} +
+
+
+

+ {$i18n.t('Direct Connections')} +

+

+ {$i18n.t('Connect to your own OpenAI compatible API endpoints.')} +

+
-
- - {$i18n.t( - 'CORS must be properly configured by the provider to allow requests from Open WebUI.' - )} + {$i18n.t( + 'CORS must be properly configured by the provider to allow requests from Open WebUI.' + )} +

- - -
- {$i18n.t( - 'Connections managed through the Admin Panel are recommended for everyday use. Direct connections provide convenient access to your own endpoints, but rely on your browser session to keep requests running, making them better suited to testing and temporary use.' - )}
{:else}
diff --git a/src/lib/components/chat/Settings/Integrations.svelte b/src/lib/components/chat/Settings/Integrations.svelte index ea3cc1dbc0..6a82c7b947 100644 --- a/src/lib/components/chat/Settings/Integrations.svelte +++ b/src/lib/components/chat/Settings/Integrations.svelte @@ -14,7 +14,6 @@ import Plus from '$lib/components/icons/Plus.svelte'; import Connection from './Tools/Connection.svelte'; import Terminals from './Integrations/Terminals.svelte'; - import UserSettingSection from './UserSettingSection.svelte'; import AddToolServerModal from '$lib/components/AddToolServerModal.svelte'; @@ -35,7 +34,6 @@ let servers: ToolServerConnection[] | null = null; let terminalServerConfigs: TerminalServerConfig[] = []; let showConnectionModal = false; - const helpTextClass = 'text-[0.6875rem] text-gray-400 dark:text-gray-600'; const addConnectionHandler = async (server: ToolServerConnection) => { servers = [...(servers ?? []), server]; @@ -104,19 +102,24 @@ >

{$i18n.t('Integrations')}

-
+
{#if servers !== null} - +
-
-
- {$i18n.t('External Tool Servers')} +
+
+

+ {$i18n.t('External Tool Servers')} +

+

+ {$i18n.t('Connect to your own OpenAPI compatible external tool servers.')} +

{#if (servers ?? []).length === 0} -
+
{$i18n.t('No tool server connections configured.')}
{/if} -
- {$i18n.t('Connect to your own OpenAPI compatible external tool servers.')} -
- +
+ +
+ updateHandler()} /> +
+ +
+
+

+ {$i18n.t( + 'Connections managed through the Admin Panel are recommended for everyday use. Direct connections provide convenient access to your own endpoints, but rely on your browser session to keep requests running, making them better suited to testing and temporary use.' + )} +

+

{$i18n.t( 'CORS must be properly configured by the provider to allow requests from Open WebUI.' )} - {$i18n.t('Learn more about OpenAPI tool servers.')} ↗ -

+

-
- - - updateHandler()} /> - -
- {$i18n.t( - 'Connect to Open Terminal instances to browse files and use them as always-on tools. Only one can be active at a time.' - )} -
- {$i18n.t('Learn more about Open Terminal')} ↗ -
- -
- {$i18n.t( - 'Connections managed through the Admin Panel are recommended for everyday use. Direct connections provide convenient access to your own endpoints, but rely on your browser session to keep requests running, making them better suited to testing and temporary use.' - )}
{:else}
diff --git a/src/lib/components/chat/Settings/Integrations/Terminals.svelte b/src/lib/components/chat/Settings/Integrations/Terminals.svelte index bc9ea39ce3..4bf74682c8 100644 --- a/src/lib/components/chat/Settings/Integrations/Terminals.svelte +++ b/src/lib/components/chat/Settings/Integrations/Terminals.svelte @@ -57,13 +57,20 @@ />
-
-
-
{$i18n.t('Open Terminal')}
+
+
+

+ {$i18n.t('Open Terminal')} +

+

+ {$i18n.t( + 'Connect to Open Terminal instances to browse files and use them as always-on tools. Only one can be active at a time.' + )} +

{#if servers.length === 0} -
+
{$i18n.t('No terminal connections configured.')}
{/if} + {$i18n.t('Learn more about Open Terminal')} ↗