diff --git a/web/html/xui/component/sortableTable.html b/web/html/xui/component/sortableTable.html
index 8d14e091..5eb2e1cc 100644
--- a/web/html/xui/component/sortableTable.html
+++ b/web/html/xui/component/sortableTable.html
@@ -90,7 +90,6 @@
const hideDragImage = this.$el.cloneNode(true);
hideDragImage.id = "hideDragImage-hide";
hideDragImage.style.opacity = 0;
- document.body.appendChild(hideDragImage);
e.dataTransfer.setDragImage(hideDragImage, 0, 0);
},
dragStopHandler(e, index) {
diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html
index 56d8f1d6..7a54584c 100644
--- a/web/html/xui/xray.html
+++ b/web/html/xui/xray.html
@@ -1407,16 +1407,28 @@
templateSettings: {
get: function () {
const parsedSettings = this.xraySetting ? JSON.parse(this.xraySetting) : null;
- const setLogPath = (type, defaultValue) => parsedSettings?.log?.[type] !== "none" ? parsedSettings.log[type] : defaultValue;
- this.access = ["none", setLogPath("access", "./access.log")];
- this.error = ["none", setLogPath("error", "./error.log")];
+ let accessLogPath = "./access.log";
+ let errorLogPath = "./error.log";
+
+ if (parsedSettings && parsedSettings.log) {
+ if (parsedSettings.log.access && parsedSettings.log.access !== "none") {
+ accessLogPath = parsedSettings.log.access;
+ }
+ if (parsedSettings.log.error && parsedSettings.log.error !== "none") {
+ errorLogPath = parsedSettings.log.error;
+ }
+ }
+
+ this.access = ["none", accessLogPath];
+ this.error = ["none", errorLogPath];
return parsedSettings;
},
set: function (newValue) {
- this.xraySetting = JSON.stringify(newValue, null, 2);
- const setLogPath = (type, defaultValue) => newValue.log?.[type] ? newValue.log[type] : defaultValue;
- this.access = ["none", setLogPath("access", "./access.log")];
- this.error = ["none", setLogPath("error", "./error.log")];
+ if (newValue && newValue.log) {
+ this.xraySetting = JSON.stringify(newValue, null, 2);
+ this.access = ["none", newValue.log.access || "./access.log"];
+ this.error = ["none", newValue.log.error || "./error.log"];
+ }
},
},
inboundSettings: {