[PR #13889] [MERGED] feat: Custom Title and Text for Account Activation Screen for pending users #23324

Closed
opened 2026-04-20 04:45:13 -05:00 by GiteaMirror · 0 comments
Owner

📋 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: devHead: pendingtext


📝 Commits (5)

📊 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:

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation? (Self-note: No new runtime dependencies were added)
  • Testing: Have you written and run sufficient tests to validate the changes? (Self-note: Manual testing was performed during development to confirm functionality)
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
    • feat: Introduces a new feature or enhancement to the codebase

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

  • Customizable Account Pending Screen Text:
    • New environment variables ACCOUNT_PENDING_TITLE and ACCOUNT_PENDING_TEXT to set custom title and description for the account pending screen.
    • New persistent configuration options ui.account_pending_title and ui.account_pending_text stored in the database.
    • New input fields in the Admin Panel (Settings > General > Authentication section) for administrators to configure "Custom Account Pending Title" and "Custom Account Pending Text".
  • Backend Support:
    • config.py: Added ACCOUNT_PENDING_TITLE and ACCOUNT_PENDING_TEXT as PersistentConfig instances.
    • main.py: Registered the new persistent configs with the application state and included them in the /api/config endpoint under a ui key.
    • routers/auths.py: Updated get_admin_config and update_admin_config API endpoints and their Pydantic models to handle the new configuration settings.
  • Frontend Enhancements:
    • 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.ui store if available, otherwise falls back to default i18n strings.
    • src/lib/stores/index.ts: Updated the Config and UiConfig types to include account_pending_title and account_pending_text.
  • Internationalization (i18n):
    • Added new i18n keys for the labels and placeholder/description texts related to the new admin panel inputs for customizing the account pending screen.

EDIT: Env var names were changed my maintainer after PR was merged. New env var names are as follows:
PENDING_USER_OVERLAY_TITLE
PENDING_USER_OVERLAY_CONTENT

Changed

  • backend/open_webui/config.py: Added new PersistentConfig definitions.
  • backend/open_webui/main.py:
    • Imported new config variables.
    • Registered new config variables with app.state.config.
    • Modified the /api/config endpoint to include account_pending_title and account_pending_text under a ui key in the response.
  • backend/open_webui/routers/auths.py:
    • Added ACCOUNT_PENDING_TITLE and ACCOUNT_PENDING_TEXT to the AdminConfig Pydantic model.
    • Included these fields in the response of get_admin_config.
    • Handled saving and returning these fields in 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: Modified UiConfig type definition within Config type to include the new optional string fields.
  • All src/lib/i18n/locales/*/translation.json files: 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_TITLE
PENDING_USER_OVERLAY_CONTENT


Additional Information

  • The primary goal was to allow administrators more flexibility in communicating with users whose accounts are in a "pending" state.
  • The changes maintain backward compatibility, ensuring that if the new configurations are not used, the system behaves as it did previously.
  • The new i18n keys added to translation.json files 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:

image
image

After setting values:

image
image

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.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/13889 **Author:** [@Classic298](https://github.com/Classic298) **Created:** 5/14/2025 **Status:** ✅ Merged **Merged:** 5/14/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `pendingtext` --- ### 📝 Commits (5) - [`143cb4c`](https://github.com/open-webui/open-webui/commit/143cb4cc34722217e3c15f1c2ec93c43dd97e095) feat custom text and title - [`bdb3778`](https://github.com/open-webui/open-webui/commit/bdb3778f8b88cd144c75a37ab6ec0a0aae604117) fix - [`e9eb661`](https://github.com/open-webui/open-webui/commit/e9eb661b8368cadfc1dc67ee8c4b4df9d207ff45) fix + i18n - [`9214011`](https://github.com/open-webui/open-webui/commit/92140118f2f2b73f61dcbeed91c3c9daebecf9bf) revert i18n - [`3974e53`](https://github.com/open-webui/open-webui/commit/3974e53cc327c1e6b28c19775ed76e69d63dc88b) i18n ### 📊 Changes **60 files changed** (+280 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `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_ </details> ### 📄 Description # Pull Request Checklist **Before submitting, make sure you've checked the following:** - [x] **Target branch:** Please verify that the pull request targets the `dev` branch. - [x] **Description:** Provide a concise description of the changes made in this pull request. - [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [X] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [X] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? *(Self-note: No new runtime dependencies were added)* - [x] **Testing:** Have you written and run sufficient tests to validate the changes? *(Self-note: Manual testing was performed during development to confirm functionality)* - [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [x] **Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following: - **feat**: Introduces a new feature or enhancement to the codebase # 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 - **Customizable Account Pending Screen Text:** - ~~New environment variables `ACCOUNT_PENDING_TITLE` and `ACCOUNT_PENDING_TEXT` to set custom title and description for the account pending screen.~~ - New persistent configuration options `ui.account_pending_title` and `ui.account_pending_text` stored in the database. - New input fields in the Admin Panel (Settings > General > Authentication section) for administrators to configure "Custom Account Pending Title" and "Custom Account Pending Text". - **Backend Support:** - ~~`config.py`: Added `ACCOUNT_PENDING_TITLE` and `ACCOUNT_PENDING_TEXT` as `PersistentConfig` instances.~~ - `main.py`: Registered the new persistent configs with the application state and included them in the `/api/config` endpoint under a `ui` key. - `routers/auths.py`: Updated `get_admin_config` and `update_admin_config` API endpoints and their Pydantic models to handle the new configuration settings. - **Frontend Enhancements:** - `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.ui` store if available, otherwise falls back to default i18n strings. - `src/lib/stores/index.ts`: Updated the `Config` and `UiConfig` types to ~~include `account_pending_title` and `account_pending_text`.~~ - **Internationalization (i18n):** - Added new i18n keys for the labels and placeholder/description texts related to the new admin panel inputs for customizing the account pending screen. **EDIT: Env var names were changed my maintainer after PR was merged. New env var names are as follows: `PENDING_USER_OVERLAY_TITLE` `PENDING_USER_OVERLAY_CONTENT`** ### Changed - `backend/open_webui/config.py`: Added new `PersistentConfig` definitions. - `backend/open_webui/main.py`: - Imported new config variables. - Registered new config variables with `app.state.config`. - Modified the `/api/config` endpoint to ~~include `account_pending_title` and `account_pending_text`~~ under a `ui` key in the response. - `backend/open_webui/routers/auths.py`: - ~~Added `ACCOUNT_PENDING_TITLE` and `ACCOUNT_PENDING_TEXT` to the `AdminConfig` Pydantic model.~~ - Included these fields in the response of `get_admin_config`. - Handled saving and returning these fields in `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`: Modified `UiConfig` type definition within `Config` type to include the new optional string fields. - All `src/lib/i18n/locales/*/translation.json` files: 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_TITLE` `PENDING_USER_OVERLAY_CONTENT`** --- ### Additional Information - The primary goal was to allow administrators more flexibility in communicating with users whose accounts are in a "pending" state. - The changes maintain backward compatibility, ensuring that if the new configurations are not used, the system behaves as it did previously. - The new i18n keys added to `translation.json` files 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**: ![image](https://github.com/user-attachments/assets/38547df8-04c0-46d8-adba-59ba52417d47) ![image](https://github.com/user-attachments/assets/10284081-a69e-475d-b398-2dbe19b9b557) **After setting values:** ![image](https://github.com/user-attachments/assets/1871ad1a-e62d-4496-84eb-4a9f8a402592) ![image](https://github.com/user-attachments/assets/a25c5579-a09e-4d29-9139-0deb51274008) ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 04:45:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#23324