From 95200facdee1533713b27b60ed775ea93db41c9c Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Fri, 8 Dec 2023 21:49:11 +0100 Subject: [PATCH] better seeting view #1300 --- web/html/xui/settings.html | 136 +++++++++++++++++++++---------------- 1 file changed, 76 insertions(+), 60 deletions(-) diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index f40b20a5..33ed36bf 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -165,60 +165,73 @@ - - - - - - - - - - - - - - - - - {{ i18n "confirm" }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ i18n "confirm" }} - - - + {{ i18n "pages.settings.security.admin"}} + + + + + + + + + + + + + + + + + + +
{{ i18n "pages.settings.oldUsername"}}: + + + +
{{ i18n "pages.settings.currentPassword"}}: + + + +
{{ i18n "pages.settings.newUsername"}}: + + + +
{{ i18n "pages.settings.newPassword"}}: + + + +
+ {{ i18n "confirm" }} +
+ {{ i18n "pages.settings.security.secret"}} + + + + + + + + + + + + + + + + + + + + + + {{ i18n "confirm" }} +
@@ -289,6 +302,7 @@ siderDrawer, themeSwitcher, spinning: false, + changeSecret: false, oldAllSetting: new AllSetting(), allSetting: new AllSetting(), saveBtnDisable: true, @@ -405,12 +419,14 @@ return randomString; }, async getNewSecret() { - this.loading(true); - await PromiseUtil.sleep(600); - const newSecret = this.generateRandomString(64); - this.user.loginSecret = newSecret; - document.getElementById("token").textContent = newSecret; - this.loading(false); + if (!this.changeSecret) { + this.changeSecret = true; + this.user.loginSecret = ''; + const newSecret = this.generateRandomString(64); + await PromiseUtil.sleep(1000); + this.user.loginSecret = newSecret; + this.changeSecret = false; + } }, async toggleToken(value) { if (value) {