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
path: root/web/html
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-04-24 02:18:17 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-04-24 02:18:17 +0300
commitd1c4eb9b4c4a6e84f3b4984ac8ee3e0e066de2af (patch)
tree83d16c51e835f9442997eae2b0b55aefdeeffe5f /web/html
parentdfa3d39ab30341397804d8653cd60917c895e74d (diff)
Update setting.html
Diffstat (limited to 'web/html')
-rw-r--r--web/html/xui/setting.html30
1 files 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;