From 04f1d55425a6810705b7102c0e9a2a9d1e458357 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");