diff --git a/src/lib/components/chat/Settings/Account.svelte b/src/lib/components/chat/Settings/Account.svelte index db403252f..80fc143b1 100644 --- a/src/lib/components/chat/Settings/Account.svelte +++ b/src/lib/components/chat/Settings/Account.svelte @@ -87,7 +87,7 @@
-
+
-
+
+ +
-
+ {#if ($config?.features?.enable_api_key ?? true) || $user?.role === 'admin'} +
+
{$i18n.t('API keys')}
+ +
-
-
{$i18n.t('API keys')}
- -
+ {#if showAPIKeys} +
+ {#if $user?.role === 'admin'} +
+
+
{$i18n.t('JWT Token')}
+
- {#if showAPIKeys} -
-
-
-
{$i18n.t('JWT Token')}
-
- -
- - - -
-
- {#if $config?.features?.enable_api_key ?? true} -
-
-
{$i18n.t('API Key')}
-
-
- {#if APIKey} - +
+ +
+
+ {/if} + + {#if $config?.features?.enable_api_key ?? true} +
+ {#if $user?.role === 'admin'} +
+
{$i18n.t('API Key')}
+
+ {/if} +
+ {#if APIKey} + - + + + + + {:else} + - - {:else} - - {/if} + {$i18n.t('Create new secret key')} + {/if} +
-
- {/if} -
+ {/if} +
+ {/if} {/if}