Browse Source

Update setting.html

MHSanaei 1 year ago
parent
commit
d1c4eb9b4c
1 changed files with 15 additions and 15 deletions
  1. 15 15
      web/html/xui/setting.html

+ 15 - 15
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;