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
diff options
context:
space:
mode:
authorHamidreza Ghavami <hamid.r.gh.1998@gmail.com>2023-04-18 19:53:51 +0300
committerHamidreza Ghavami <hamid.r.gh.1998@gmail.com>2023-04-18 19:53:51 +0300
commitf26a7df11b9b3455e461b7d5ca7a51cf4ca0a838 (patch)
tree36bfa7b5309a81d79eb8326b0851b342098ae07c /web/html/xui/setting.html
parent72a1b1e3f33cbe96c313f4f1da3ad771195c2a26 (diff)
add reset default config function
Diffstat (limited to 'web/html/xui/setting.html')
-rw-r--r--web/html/xui/setting.html9
1 files changed, 9 insertions, 0 deletions
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");