mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-11 10:34:13 -05:00
[PR #13889] [MERGED] feat: Custom Title and Text for Account Activation Screen for pending users #23324
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/13889
Author: @Classic298
Created: 5/14/2025
Status: ✅ Merged
Merged: 5/14/2025
Merged by: @tjbck
Base:
dev← Head:pendingtext📝 Commits (5)
143cb4cfeat custom text and titlebdb3778fixe9eb661fix + i18n9214011revert i18n3974e53i18n📊 Changes
60 files changed (+280 additions, -8 deletions)
View changed files
📝
backend/open_webui/config.py(+12 -0)📝
backend/open_webui/main.py(+8 -0)📝
backend/open_webui/routers/auths.py(+9 -0)📝
src/lib/components/admin/Settings/General.svelte(+20 -0)📝
src/lib/components/layout/Overlay/AccountPending.svelte(+15 -8)📝
src/lib/i18n/locales/ar-BH/translation.json(+4 -0)📝
src/lib/i18n/locales/ar/translation.json(+4 -0)📝
src/lib/i18n/locales/bg-BG/translation.json(+4 -0)📝
src/lib/i18n/locales/bn-BD/translation.json(+4 -0)📝
src/lib/i18n/locales/bo-TB/translation.json(+4 -0)📝
src/lib/i18n/locales/ca-ES/translation.json(+4 -0)📝
src/lib/i18n/locales/ceb-PH/translation.json(+4 -0)📝
src/lib/i18n/locales/cs-CZ/translation.json(+4 -0)📝
src/lib/i18n/locales/da-DK/translation.json(+4 -0)📝
src/lib/i18n/locales/de-DE/translation.json(+4 -0)📝
src/lib/i18n/locales/dg-DG/translation.json(+4 -0)📝
src/lib/i18n/locales/el-GR/translation.json(+4 -0)📝
src/lib/i18n/locales/en-GB/translation.json(+4 -0)📝
src/lib/i18n/locales/en-US/translation.json(+4 -0)📝
src/lib/i18n/locales/es-ES/translation.json(+4 -0)...and 40 more files
📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
This pull request introduces a new feature allowing administrators to customize the text displayed on the "Account Activation Pending" screen. Previously, this text was static and sourced from i18n translations. Now, administrators can set a custom title and a custom descriptive text via environment variables and through a new section in the Admin Panel (General Settings).
The feature is designed to be backward compatible. If the custom texts are not set (either via environment variables or in the admin panel), the system will fall back to displaying the default i18n translated strings, ensuring no change in behavior for existing setups or if custom text is not desired.
Added
New environment variablesACCOUNT_PENDING_TITLEandACCOUNT_PENDING_TEXTto set custom title and description for the account pending screen.ui.account_pending_titleandui.account_pending_textstored in the database.config.py: AddedACCOUNT_PENDING_TITLEandACCOUNT_PENDING_TEXTasPersistentConfiginstances.main.py: Registered the new persistent configs with the application state and included them in the/api/configendpoint under auikey.routers/auths.py: Updatedget_admin_configandupdate_admin_configAPI endpoints and their Pydantic models to handle the new configuration settings.src/lib/components/admin/Settings/General.svelte: Added two new textarea inputs for configuring the custom title and text.src/lib/components/layout/Overlay/AccountPending.svelte: Modified to display the custom title and text from the$config.uistore if available, otherwise falls back to default i18n strings.src/lib/stores/index.ts: Updated theConfigandUiConfigtypes toincludeaccount_pending_titleandaccount_pending_text.EDIT: Env var names were changed my maintainer after PR was merged. New env var names are as follows:
PENDING_USER_OVERLAY_TITLEPENDING_USER_OVERLAY_CONTENTChanged
backend/open_webui/config.py: Added newPersistentConfigdefinitions.backend/open_webui/main.py:app.state.config./api/configendpoint toincludeunder aaccount_pending_titleandaccount_pending_textuikey in the response.backend/open_webui/routers/auths.py:AddedACCOUNT_PENDING_TITLEandACCOUNT_PENDING_TEXTto theAdminConfigPydantic model.get_admin_config.update_admin_config.src/lib/components/admin/Settings/General.svelte: Added new UI elements for text configuration.src/lib/components/layout/Overlay/AccountPending.svelte: Updated logic to conditionally display custom text or default i18n text.src/lib/stores/index.ts: ModifiedUiConfigtype definition withinConfigtype to include the new optional string fields.src/lib/i18n/locales/*/translation.jsonfiles: Added new keys for the admin panel interface.EDIT: Env var names were changed my maintainer after PR was merged. New env var names are as follows:
PENDING_USER_OVERLAY_TITLEPENDING_USER_OVERLAY_CONTENTAdditional Information
translation.jsonfiles are:"Custom Account Pending Title""Enter a custom title to be displayed on the account pending screen. Supports line breaks. Leave empty for default.""Custom Account Pending Text""Enter a custom text to be displayed on the account pending screen. Leave empty for default."Screenshots or Videos
Before setting any values:
After setting values:
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.