From e5acd6188e1ddac9867d413d72d2b1a34ec0438c Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Mon, 2 Feb 2026 13:46:38 +0200 Subject: [PATCH] feat: add ui config --- lnbits/settings.py | 6 + lnbits/static/i18n/en.js | 3 + lnbits/templates/components/admin/users.vue | 140 +++++++++++++++++++- 3 files changed, 146 insertions(+), 3 deletions(-) diff --git a/lnbits/settings.py b/lnbits/settings.py index c6b76a18c..4cc514908 100644 --- a/lnbits/settings.py +++ b/lnbits/settings.py @@ -41,6 +41,12 @@ class UsersSettings(LNbitsSettings): lnbits_admin_users: list[str] = Field(default=[]) lnbits_allowed_users: list[str] = Field(default=[]) lnbits_allow_new_accounts: bool = Field(default=True) + lnbits_require_user_activation: bool = Field(default=False) + + lnbits_user_activation_by_email: bool = Field(default=False) + lnbits_user_activation_by_nostr: bool = Field(default=False) + lnbits_user_activation_by_payment: bool = Field(default=False) + lnbits_user_activation_by_invitation_code: bool = Field(default=False) @property def new_accounts_allowed(self) -> bool: diff --git a/lnbits/static/i18n/en.js b/lnbits/static/i18n/en.js index 17152dc55..130c8328a 100644 --- a/lnbits/static/i18n/en.js +++ b/lnbits/static/i18n/en.js @@ -708,6 +708,9 @@ window.localisation.en = { allowed_users_label: 'User ID', allow_creation_user: 'Allow creation of new users', allow_creation_user_desc: 'Allow creation of new users on the index page', + require_user_activation: 'Require user activation', + require_user_activation_desc: + 'New users will be activated only after they pass one of the confirmation methods. Admins can activate users manually from the admin panel.', new_user_not_allowed: 'Registration is disabled.', start_user_impersonation: 'Impersonate this user', stop_user_impersonation: 'Stop User Impersonation', diff --git a/lnbits/templates/components/admin/users.vue b/lnbits/templates/components/admin/users.vue index f52a2824e..28de9037f 100644 --- a/lnbits/templates/components/admin/users.vue +++ b/lnbits/templates/components/admin/users.vue @@ -30,7 +30,6 @@ > -

@@ -57,7 +56,10 @@ >
-
+ + +
+
@@ -76,8 +78,140 @@ /> -
+
+
+ + + + + + + + +
+
+
+ + + + + xxxx + + + + + + + + wwww + + + + + + qqq + + + + + + + yyy + + +
+