From f26a7df11b9b3455e461b7d5ca7a51cf4ca0a838 Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami Date: Tue, 18 Apr 2023 21:23:51 +0430 Subject: [PATCH] add reset default config function --- web/html/xui/setting.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/html/xui/setting.html b/web/html/xui/setting.html index dba8e14c..b7869c66 100644 --- a/web/html/xui/setting.html +++ b/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");