mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
import { compareVersion } from '$lib/utils';
|
||||
import { onMount, getContext } from 'svelte';
|
||||
import { toast } from 'svelte-sonner';
|
||||
import Textarea from '$lib/components/common/Textarea.svelte';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
@@ -306,23 +307,28 @@
|
||||
</div>
|
||||
|
||||
<div class="mb-3.5">
|
||||
<div class=" self-center text-xs font-medium mb-1">{$i18n.t('Custom Account Pending Title')}</div>
|
||||
<textarea
|
||||
class="w-full mt-1 rounded-lg py-2 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-hidden"
|
||||
rows="2"
|
||||
placeholder={$i18n.t('Enter a custom title to be displayed on the account pending screen. Leave empty for default.')}
|
||||
bind:value={adminConfig.ACCOUNT_PENDING_TITLE}
|
||||
></textarea>
|
||||
<div class=" self-center text-xs font-medium mb-1">
|
||||
{$i18n.t('Pending User Overlay Title')}
|
||||
</div>
|
||||
<Textarea
|
||||
rows={2}
|
||||
placeholder={$i18n.t(
|
||||
'Enter a title for the pending user info overlay. Leave empty for default.'
|
||||
)}
|
||||
bind:value={adminConfig.PENDING_USER_OVERLAY_TITLE}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="mb-3.5">
|
||||
<div class=" self-center text-xs font-medium mb-1">{$i18n.t('Custom Account Pending Text')}</div>
|
||||
<textarea
|
||||
class="w-full mt-1 rounded-lg py-2 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-hidden"
|
||||
rows="3"
|
||||
placeholder={$i18n.t('Enter a custom text to be displayed on the account pending screen. Leave empty for default.')}
|
||||
bind:value={adminConfig.ACCOUNT_PENDING_TEXT}
|
||||
></textarea>
|
||||
<div class=" self-center text-xs font-medium mb-1">
|
||||
{$i18n.t('Pending User Overlay Content')}
|
||||
</div>
|
||||
<Textarea
|
||||
placeholder={$i18n.t(
|
||||
'Enter content for the pending user info overlay. Leave empty for default.'
|
||||
)}
|
||||
bind:value={adminConfig.PENDING_USER_OVERLAY_CONTENT}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="mb-2.5 flex w-full justify-between pr-2">
|
||||
|
||||
@@ -21,17 +21,23 @@
|
||||
>
|
||||
<div class="m-auto pb-10 flex flex-col justify-center">
|
||||
<div class="max-w-md">
|
||||
<div class="text-center dark:text-white text-2xl font-medium z-50" style="white-space: pre-wrap;">
|
||||
{#if $config?.ui?.account_pending_title && $config?.ui?.account_pending_title.trim() !== ""}
|
||||
{$config.ui.account_pending_title}
|
||||
<div
|
||||
class="text-center dark:text-white text-2xl font-medium z-50"
|
||||
style="white-space: pre-wrap;"
|
||||
>
|
||||
{#if $config?.ui?.pending_user_overlay_title && $config?.ui?.pending_user_overlay_title.trim() !== ''}
|
||||
{$config.ui.pending_user_overlay_title}
|
||||
{:else}
|
||||
{$i18n.t('Account Activation Pending')}{#if !$config?.ui?.account_pending_title || $config?.ui?.account_pending_title.trim() === ""}<br />{/if}{$i18n.t('Contact Admin for WebUI Access')}
|
||||
{$i18n.t('Account Activation Pending')}<br />{$i18n.t('Contact Admin for WebUI Access')}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class=" mt-4 text-center text-sm dark:text-gray-200 w-full" style="white-space: pre-wrap;">
|
||||
{#if $config?.ui?.account_pending_text && $config?.ui?.account_pending_text.trim() !== ""}
|
||||
{$config.ui.account_pending_text}
|
||||
<div
|
||||
class=" mt-4 text-center text-sm dark:text-gray-200 w-full"
|
||||
style="white-space: pre-wrap;"
|
||||
>
|
||||
{#if $config?.ui?.pending_user_overlay_content && $config?.ui?.pending_user_overlay_content.trim() !== ''}
|
||||
{$config.ui.pending_user_overlay_content}
|
||||
{:else}
|
||||
{$i18n.t('Your account status is currently pending activation.')}{'\n'}{$i18n.t(
|
||||
'To access the WebUI, please reach out to the administrator. Admins can manage user statuses from the Admin Panel.'
|
||||
|
||||
@@ -220,8 +220,10 @@ type Config = {
|
||||
[key: string]: string;
|
||||
};
|
||||
};
|
||||
account_pending_title?: string;
|
||||
account_pending_text?: string;
|
||||
ui?: {
|
||||
pending_user_overlay_title?: string;
|
||||
pending_user_overlay_description?: string;
|
||||
};
|
||||
};
|
||||
|
||||
type PromptSuggestion = {
|
||||
|
||||
Reference in New Issue
Block a user