Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-05-02 15:49:49 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-05-02 15:49:49 +0300
commit6a33a48a9ac1ea8525cef03e0b1510302f6fa092 (patch)
treee1edf03ab2693c45f0cafbf77800d3d7b85c43f1 /web/html/xui/setting.html
parent1885a8c0bf0cc58d2866d64b3a11d4bfa3a22e46 (diff)
logout after update your password or secret token
Diffstat (limited to 'web/html/xui/setting.html')
-rw-r--r--web/html/xui/setting.html16
1 files changed, 9 insertions, 7 deletions
diff --git a/web/html/xui/setting.html b/web/html/xui/setting.html
index 0ab9da96..7cbb44a2 100644
--- a/web/html/xui/setting.html
+++ b/web/html/xui/setting.html
@@ -323,6 +323,7 @@
this.loading(false);
if (msg.success) {
this.user = {};
+ window.location.replace("/logout")
}
},
async restartPanel() {
@@ -350,17 +351,18 @@
this.user = user_msg.obj;
}
this.loading(false);
- },
- async updateSecret(){
+ },
+ async updateSecret(){
this.loading(true);
const msg = await HttpUtil.post("/xui/setting/updateUserSecret", this.user);
if (msg.success){
this.user = msg.obj;
+ window.location.replace("/logout")
}
this.loading(false);
await this.updateAllSetting();
- },
- async getNewSecret(){
+ },
+ async getNewSecret(){
this.loading(true);
await PromiseUtil.sleep(1000);
var chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
@@ -372,13 +374,13 @@
this.user.loginSecret = string;
document.getElementById('token').value =this.user.loginSecret;
this.loading(false);
- },
- async toggleToken(value){
+ },
+ async toggleToken(value){
if(value)
this.getNewSecret();
else
this.user.loginSecret = "";
- },
+ },
async resetXrayConfigToDefault() {
this.loading(true);
const msg = await HttpUtil.get("/xui/setting/getDefaultJsonConfig");