Update settings.html

The code is copied and applied from the Alireza0/xui

- Fix Restart Panel in New URL
- Fix Restart Panel in 'x-ui-pro'
This commit is contained in:
Xue Xianliang 自由的世界 2024-06-24 08:54:53 +03:30 committed by GitHub
parent 58647c6496
commit bb6d5dc19e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -523,6 +523,8 @@
this.loading(true);
await PromiseUtil.sleep(5000);
let { webCertFile, webKeyFile, webDomain: host, webPort: port, webBasePath: base } = this.allSetting;
if (host == this.oldAllSetting.webDomain) host = null;
if (port == this.oldAllSetting.webPort) port = null;
const isTLS = webCertFile !== "" || webKeyFile !== "";
const url = buildURL({ host, port, isTLS, base, path: "panel/settings" });
window.location.replace(url);