diff --git a/backend/open_webui/config.py b/backend/open_webui/config.py index 38bd709f1..f0c7720ab 100644 --- a/backend/open_webui/config.py +++ b/backend/open_webui/config.py @@ -989,6 +989,18 @@ DEFAULT_USER_ROLE = PersistentConfig( os.getenv("DEFAULT_USER_ROLE", "pending"), ) +ACCOUNT_PENDING_TITLE = PersistentConfig( + "ACCOUNT_PENDING_TITLE", + "ui.account_pending_title", + os.environ.get("ACCOUNT_PENDING_TITLE", "") +) + +ACCOUNT_PENDING_TEXT = PersistentConfig( + "ACCOUNT_PENDING_TEXT", + "ui.account_pending_text", + os.environ.get("ACCOUNT_PENDING_TEXT", "") +) + USER_PERMISSIONS_WORKSPACE_MODELS_ACCESS = ( os.environ.get("USER_PERMISSIONS_WORKSPACE_MODELS_ACCESS", "False").lower() == "true" diff --git a/backend/open_webui/routers/auths.py b/backend/open_webui/routers/auths.py index 309862ed5..2c22db7a8 100644 --- a/backend/open_webui/routers/auths.py +++ b/backend/open_webui/routers/auths.py @@ -696,6 +696,8 @@ async def get_admin_config(request: Request, user=Depends(get_admin_user)): "ENABLE_CHANNELS": request.app.state.config.ENABLE_CHANNELS, "ENABLE_NOTES": request.app.state.config.ENABLE_NOTES, "ENABLE_USER_WEBHOOKS": request.app.state.config.ENABLE_USER_WEBHOOKS, + "ACCOUNT_PENDING_TEXT": request.app.state.config.ACCOUNT_PENDING_TEXT, + "ACCOUNT_PENDING_TITLE": request.app.state.config.ACCOUNT_PENDING_TITLE, } @@ -713,6 +715,8 @@ class AdminConfig(BaseModel): ENABLE_CHANNELS: bool ENABLE_NOTES: bool ENABLE_USER_WEBHOOKS: bool + ACCOUNT_PENDING_TEXT: Optional[str] = None + ACCOUNT_PENDING_TITLE: Optional[str] = None @router.post("/admin/config") @@ -750,6 +754,9 @@ async def update_admin_config( request.app.state.config.ENABLE_USER_WEBHOOKS = form_data.ENABLE_USER_WEBHOOKS + request.app.state.config.ACCOUNT_PENDING_TEXT = form_data.ACCOUNT_PENDING_TEXT + request.app.state.config.ACCOUNT_PENDING_TITLE = form_data.ACCOUNT_PENDING_TITLE + return { "SHOW_ADMIN_DETAILS": request.app.state.config.SHOW_ADMIN_DETAILS, "WEBUI_URL": request.app.state.config.WEBUI_URL, @@ -764,6 +771,8 @@ async def update_admin_config( "ENABLE_CHANNELS": request.app.state.config.ENABLE_CHANNELS, "ENABLE_NOTES": request.app.state.config.ENABLE_NOTES, "ENABLE_USER_WEBHOOKS": request.app.state.config.ENABLE_USER_WEBHOOKS, + "ACCOUNT_PENDING_TEXT": request.app.state.config.ACCOUNT_PENDING_TEXT, + "ACCOUNT_PENDING_TITLE": request.app.state.config.ACCOUNT_PENDING_TITLE, } diff --git a/src/lib/components/admin/Settings/General.svelte b/src/lib/components/admin/Settings/General.svelte index 3741168f8..747cff566 100644 --- a/src/lib/components/admin/Settings/General.svelte +++ b/src/lib/components/admin/Settings/General.svelte @@ -305,6 +305,32 @@ +
+
{$i18n.t('Custom Account Pending Title')}
+ +
+ {$i18n.t('This title displays on the account pending screen. If empty, the default title is shown.')} +
+
+ +
+
{$i18n.t('Custom Account Pending Text')}
+ +
+ {$i18n.t('This text displays on the account pending screen. If empty, the default message is shown.')} +
+
+
{$i18n.t('Enable API Key')}
diff --git a/src/lib/components/layout/Overlay/AccountPending.svelte b/src/lib/components/layout/Overlay/AccountPending.svelte index 028702a13..674f6e1a1 100644 --- a/src/lib/components/layout/Overlay/AccountPending.svelte +++ b/src/lib/components/layout/Overlay/AccountPending.svelte @@ -1,6 +1,7 @@