From d1c4eb9b4c4a6e84f3b4984ac8ee3e0e066de2af Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Mon, 24 Apr 2023 02:48:17 +0330 Subject: [PATCH] Update setting.html --- web/html/xui/setting.html | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/web/html/xui/setting.html b/web/html/xui/setting.html index db318ee4..c5ee6c54 100644 --- a/web/html/xui/setting.html +++ b/web/html/xui/setting.html @@ -298,9 +298,9 @@ this.spinning = spinning; }, async getAllSetting() { - this.loading(true,{}); + this.loading(true); const msg = await HttpUtil.post("/xui/setting/all"); - this.loading(false,null); + this.loading(false); if (msg.success) { this.oldAllSetting = new AllSetting(msg.obj); this.allSetting = new AllSetting(msg.obj); @@ -309,17 +309,17 @@ await this.getUserSecret(); }, async updateAllSetting() { - this.loading(true,{}); + this.loading(true); const msg = await HttpUtil.post("/xui/setting/update", this.allSetting); - this.loading(false,null); + this.loading(false); if (msg.success) { await this.getAllSetting(); } }, async updateUser() { - this.loading(true,{}); + this.loading(true); const msg = await HttpUtil.post("/xui/setting/updateUser", this.user); - this.loading(false,null); + this.loading(false); if (msg.success) { this.user = {}; } @@ -334,11 +334,11 @@ onOk: () => resolve(), }); }); - this.loading(true,{}); + this.loading(true); const msg = await HttpUtil.post("/xui/setting/restartPanel"); - this.loading(false,null); + this.loading(false); if (msg.success) { - this.loading(true,{}); + this.loading(true); await PromiseUtil.sleep(5000); location.reload(); } @@ -351,16 +351,16 @@ this.loading(false); }, async updateSecret(){ - this.loading(true,{}); + this.loading(true); const msg = await HttpUtil.post("/xui/setting/updateUserSecret", this.user); if (msg.success){ this.user = msg.obj; } - this.loading(false,null); + this.loading(false); await this.updateAllSetting(); }, async getNewSecret(){ - this.loading(true,{}); + this.loading(true); await PromiseUtil.sleep(1000); var chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'; var string = ''; @@ -370,7 +370,7 @@ } this.user.loginSecret = string; document.getElementById('token').value =this.user.loginSecret; - this.loading(false,null); + this.loading(false); }, async toggleToken(value){ if(value) @@ -379,9 +379,9 @@ this.user.loginSecret = ""; }, async resetXrayConfigToDefault() { - this.loading(true,{}); + this.loading(true); const msg = await HttpUtil.get("/xui/setting/getDefaultJsonConfig"); - this.loading(false,null); + this.loading(false); if (msg.success) { this.templateSettings = JSON.parse(JSON.stringify(msg.obj, null, 2)); this.saveBtnDisable = true;