Преглед на файлове

add reset default config function

Hamidreza Ghavami преди 1 година
родител
ревизия
f26a7df11b
променени са 1 файла, в които са добавени 9 реда и са изтрити 0 реда
  1. 9 0
      web/html/xui/setting.html

+ 9 - 0
web/html/xui/setting.html

@@ -271,6 +271,15 @@ const app = new Vue({
                         location.reload();
                     }
                 },
+                async resetXrayConfigToDefault() {
+                    this.loading(true);
+                    const msg = await HttpUtil.get("/xui/setting/getDefaultJsonConfig");
+                    this.loading(false);
+                    if (msg.success) {
+                        this.templateSettings = JSON.parse(JSON.stringify(msg.obj, null, 2));
+                        this.saveBtnDisable = true;
+                    }
+                },
                 checkRequiredOutbounds() {
                     const newTemplateSettings = this.templateSettings;
                     const haveIPv4Outbounds = newTemplateSettings.outbounds.some((o) => o?.tag === "IPv4");