mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
feat custom text and title
This commit is contained in:
@@ -305,6 +305,32 @@
|
||||
<Switch bind:state={adminConfig.SHOW_ADMIN_DETAILS} />
|
||||
</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 custom title. Supports line breaks. Leave empty for default.')}
|
||||
bind:value={adminConfig.ACCOUNT_PENDING_TITLE}
|
||||
></textarea>
|
||||
<div class="mt-1 text-xs text-gray-400 dark:text-gray-500">
|
||||
{$i18n.t('This title displays on the account pending screen. If empty, the default title is shown.')}
|
||||
</div>
|
||||
</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 custom text. Leave empty for default.')}
|
||||
bind:value={adminConfig.ACCOUNT_PENDING_TEXT}
|
||||
></textarea>
|
||||
<div class="mt-1 text-xs text-gray-400 dark:text-gray-500">
|
||||
{$i18n.t('This text displays on the account pending screen. If empty, the default message is shown.')}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-2.5 flex w-full justify-between pr-2">
|
||||
<div class=" self-center text-xs font-medium">{$i18n.t('Enable API Key')}</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { getAdminDetails } from '$lib/apis/auths';
|
||||
import { onMount, tick, getContext } from 'svelte';
|
||||
import { config } from '$lib/stores';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
@@ -20,16 +21,22 @@
|
||||
>
|
||||
<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">
|
||||
{$i18n.t('Account Activation Pending')}<br />
|
||||
{$i18n.t('Contact Admin for WebUI Access')}
|
||||
<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}
|
||||
{: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')}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class=" mt-4 text-center text-sm dark:text-gray-200 w-full">
|
||||
{$i18n.t('Your account status is currently pending activation.')}<br />
|
||||
{$i18n.t(
|
||||
'To access the WebUI, please reach out to the administrator. Admins can manage user statuses from the Admin Panel.'
|
||||
)}
|
||||
<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}
|
||||
{: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.'
|
||||
)}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if adminDetails}
|
||||
|
||||
Reference in New Issue
Block a user