diff --git a/src/lib/components/admin/Settings/Audio.svelte b/src/lib/components/admin/Settings/Audio.svelte index 45413e100..a390d317c 100644 --- a/src/lib/components/admin/Settings/Audio.svelte +++ b/src/lib/components/admin/Settings/Audio.svelte @@ -5,6 +5,7 @@ import { toast } from 'svelte-sonner'; import Switch from '$lib/components/common/Switch.svelte'; import { getBackendConfig } from '$lib/apis'; + import SensitiveInput from '$lib/components/common/SensitiveInput.svelte'; const dispatch = createEventDispatcher(); const i18n = getContext('i18n'); @@ -18,13 +19,11 @@ let TTS_ENGINE = ''; let TTS_MODEL = ''; let TTS_VOICE = ''; - let showTTSKey = false; let STT_OPENAI_API_BASE_URL = ''; let STT_OPENAI_API_KEY = ''; let STT_ENGINE = ''; let STT_MODEL = ''; - let showSTTKey = false; let voices = []; let models = []; @@ -145,54 +144,7 @@ required /> -
- - -
+ @@ -257,54 +209,7 @@ required /> -
- - -
+ {/if} diff --git a/src/lib/components/admin/Settings/Connections.svelte b/src/lib/components/admin/Settings/Connections.svelte index 5a45ef1d4..9f81bc639 100644 --- a/src/lib/components/admin/Settings/Connections.svelte +++ b/src/lib/components/admin/Settings/Connections.svelte @@ -25,6 +25,7 @@ import Spinner from '$lib/components/common/Spinner.svelte'; import Tooltip from '$lib/components/common/Tooltip.svelte'; import { getModels as _getModels } from '$lib/apis'; + import SensitiveInput from '$lib/components/common/SensitiveInput.svelte'; const i18n = getContext('i18n'); @@ -38,7 +39,6 @@ let OPENAI_API_KEYS = ['']; let OPENAI_API_BASE_URLS = ['']; - let showAPIKeys = [false]; let pipelineUrls = {}; @@ -230,54 +230,7 @@ {/if} -
- - -
+
{#if idx === 0} -
+
{$i18n.t('Embedding Batch Size')}
diff --git a/src/lib/components/admin/Settings/Images.svelte b/src/lib/components/admin/Settings/Images.svelte index 7433c901b..ecfcea8cc 100644 --- a/src/lib/components/admin/Settings/Images.svelte +++ b/src/lib/components/admin/Settings/Images.svelte @@ -19,6 +19,7 @@ updateOpenAIConfig } from '$lib/apis/images'; import { getBackendConfig } from '$lib/apis'; + import SensitiveInput from '$lib/components/common/SensitiveInput.svelte'; const dispatch = createEventDispatcher(); const i18n = getContext('i18n'); @@ -34,7 +35,6 @@ let OPENAI_API_BASE_URL = ''; let OPENAI_API_KEY = ''; - let showOpenAIKey = false; let selectedModel = ''; let models = null; @@ -277,15 +277,7 @@
{$i18n.t('AUTOMATIC1111 Api Auth String')}
-
-
- -
-
+
{$i18n.t('Include `--api-auth` flag when running stable-diffusion-webui')} @@ -340,54 +332,7 @@ required /> -
- - -
+
{/if} diff --git a/src/lib/components/admin/Settings/WebSearch.svelte b/src/lib/components/admin/Settings/WebSearch.svelte index 15a5257cb..4aa3379ec 100644 --- a/src/lib/components/admin/Settings/WebSearch.svelte +++ b/src/lib/components/admin/Settings/WebSearch.svelte @@ -5,6 +5,7 @@ import { documents, models } from '$lib/stores'; import { onMount, getContext } from 'svelte'; import { toast } from 'svelte-sonner'; + import SensitiveInput from '$lib/components/common/SensitiveInput.svelte'; const i18n = getContext('i18n'); @@ -22,7 +23,6 @@ 'tavily', 'jina' ]; - let showApiKey = false; let youtubeLanguage = 'en'; let youtubeTranslation = null; @@ -116,56 +116,7 @@ {$i18n.t('Google PSE API Key')} -
-
- - -
-
+
@@ -190,56 +141,7 @@ {$i18n.t('Brave Search API Key')}
-
-
- - -
-
+
{:else if webConfig.search.engine === 'serpstack'}
@@ -247,56 +149,7 @@ {$i18n.t('Serpstack API Key')}
-
-
- - -
-
+ {:else if webConfig.search.engine === 'serper'}
@@ -304,56 +157,7 @@ {$i18n.t('Serper API Key')}
-
-
- - -
-
+ {:else if webConfig.search.engine === 'serply'}
@@ -361,56 +165,7 @@ {$i18n.t('Serply API Key')}
-
-
- - -
-
+ {:else if webConfig.search.engine === 'tavily'}
@@ -418,56 +173,7 @@ {$i18n.t('Tavily API Key')}
-
-
- - -
-
+ {/if} diff --git a/src/lib/components/chat/Settings/Account.svelte b/src/lib/components/chat/Settings/Account.svelte index 1ed5beac8..177bacb75 100644 --- a/src/lib/components/chat/Settings/Account.svelte +++ b/src/lib/components/chat/Settings/Account.svelte @@ -11,6 +11,7 @@ import { copyToClipboard } from '$lib/utils'; import Plus from '$lib/components/icons/Plus.svelte'; import Tooltip from '$lib/components/common/Tooltip.svelte'; + import SensitiveInput from '$lib/components/common/SensitiveInput.svelte'; const i18n = getContext('i18n'); @@ -21,11 +22,9 @@ let showAPIKeys = false; - let showJWTToken = false; let JWTTokenCopied = false; let APIKey = ''; - let showAPIKey = false; let APIKeyCopied = false; let profileImageInputElement: HTMLInputElement; @@ -255,53 +254,7 @@
-
- - - -
+ -
+ +