支持为静态资源设置独立地址
This commit is contained in:
@@ -131,7 +131,8 @@
|
||||
customMetricsList: document.getElementById('customMetricsList'),
|
||||
btnAddCustomMetric: document.getElementById('btnAddCustomMetric'),
|
||||
btnSaveCustomMetrics: document.getElementById('btnSaveCustomMetrics'),
|
||||
customDataContainer: document.getElementById('customDataContainer')
|
||||
customDataContainer: document.getElementById('customDataContainer'),
|
||||
cdnUrlInput: document.getElementById('cdnUrlInput')
|
||||
};
|
||||
|
||||
// ---- State ----
|
||||
@@ -2146,13 +2147,13 @@
|
||||
if (dom.faviconUrlInput) dom.faviconUrlInput.value = settings.favicon_url || '';
|
||||
if (dom.showPageNameInput) dom.showPageNameInput.value = settings.show_page_name !== undefined ? settings.show_page_name.toString() : "1";
|
||||
if (dom.requireLoginForServerDetailsInput) dom.requireLoginForServerDetailsInput.value = settings.require_login_for_server_details ? "1" : "0";
|
||||
if (dom.showServerIpInput) dom.showServerIpInput.value = settings.show_server_ip ? "1" : "0";
|
||||
if (dom.cdnUrlInput) dom.cdnUrlInput.value = settings.cdn_url || '';
|
||||
|
||||
// Handle Theme Priority: localStorage > Site Default
|
||||
const savedTheme = localStorage.getItem('theme');
|
||||
const themeToApply = savedTheme || settings.default_theme || 'dark';
|
||||
applyTheme(themeToApply);
|
||||
|
||||
// Listen for system theme changes if set to auto (cleanup existing listener first)
|
||||
if (siteThemeQuery && siteThemeHandler) {
|
||||
siteThemeQuery.removeEventListener('change', siteThemeHandler);
|
||||
}
|
||||
@@ -2309,7 +2310,8 @@
|
||||
show_server_ip: dom.showServerIpInput ? (dom.showServerIpInput.value === "1") : false,
|
||||
ip_metric_name: dom.ipMetricNameInput ? dom.ipMetricNameInput.value.trim() : null,
|
||||
ip_label_name: dom.ipLabelNameInput ? dom.ipLabelNameInput.value.trim() : 'address',
|
||||
custom_metrics: getCustomMetricsFromUI()
|
||||
custom_metrics: getCustomMetricsFromUI(),
|
||||
cdn_url: dom.cdnUrlInput ? dom.cdnUrlInput.value.trim() : ''
|
||||
};
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user