Merge pull request #13889 from Classic298/pendingtext

feat: Custom Title and Text for Account Activation Screen for pending users
This commit is contained in:
Tim Jaeryang Baek
2025-05-14 21:28:16 +04:00
committed by GitHub
60 changed files with 280 additions and 8 deletions
+9
View File
@@ -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,
}