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 <70919649+hamid-gh98@users.noreply.github.com>2023-05-31 00:17:07 +0300
committerHamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com>2023-05-31 00:29:41 +0300
commitb203067dfd416bd45d34cc2dbaad85ab51fcb085 (patch)
treef9243bf31ea112fc6c51a53f9b3bcd76a18b2f1f /web/html/xui/settings.html
parent1c9fc9422e304c8710b56e9719960e429e7a1878 (diff)
fix urls + use the new buildURL func
Diffstat (limited to 'web/html/xui/settings.html')
-rw-r--r--web/html/xui/settings.html12
1 files changed, 5 insertions, 7 deletions
diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html
index e7d865f6..e4103c52 100644
--- a/web/html/xui/settings.html
+++ b/web/html/xui/settings.html
@@ -523,7 +523,7 @@
this.loading(false);
if (msg.success) {
this.user = {};
- window.location.replace(basePath + "logout")
+ window.location.replace(basePath + "logout");
}
},
async restartPanel() {
@@ -542,12 +542,10 @@
if (msg.success) {
this.loading(true);
await PromiseUtil.sleep(5000);
- let protocol = "http://";
- if (this.allSetting.webCertFile !== "") {
- protocol = "https://";
- }
- const { host } = window.location;
- window.location.replace(protocol + host + this.allSetting.webBasePath + "panel/settings");
+ const { webCertFile, webKeyFile, webDomain: host, webPort: port, webBasePath: base } = this.allSetting;
+ const isTLS = webCertFile !== "" || webKeyFile !== "";
+ const url = buildURL({ host, port, isTLS, base, path: "panel/settings" });
+ window.location.replace(url);
}
},
async fetchUserSecret() {