添加copyright
This commit is contained in:
@@ -105,7 +105,14 @@
|
||||
partitionSummary: document.getElementById('partitionSummary'),
|
||||
partitionHeader: document.getElementById('partitionHeader'),
|
||||
globeCard: document.getElementById('globeCard'),
|
||||
btnExpandGlobe: document.getElementById('btnExpandGlobe')
|
||||
btnExpandGlobe: document.getElementById('btnExpandGlobe'),
|
||||
// Footer & Filing
|
||||
icpFilingInput: document.getElementById('icpFilingInput'),
|
||||
psFilingInput: document.getElementById('psFilingInput'),
|
||||
icpFilingDisplay: document.getElementById('icpFilingDisplay'),
|
||||
psFilingDisplay: document.getElementById('psFilingDisplay'),
|
||||
psFilingText: document.getElementById('psFilingText'),
|
||||
copyrightYear: document.getElementById('copyrightYear')
|
||||
};
|
||||
|
||||
// ---- State ----
|
||||
@@ -146,6 +153,11 @@
|
||||
updateGaugesTime();
|
||||
setInterval(updateGaugesTime, 1000);
|
||||
|
||||
// Initial footer year
|
||||
if (dom.copyrightYear) {
|
||||
dom.copyrightYear.textContent = new Date().getFullYear();
|
||||
}
|
||||
|
||||
// Initial theme check (localStorage handled after site settings load to ensure priority)
|
||||
|
||||
// Network chart
|
||||
@@ -473,6 +485,8 @@
|
||||
if (dom.defaultThemeInput) dom.defaultThemeInput.value = window.SITE_SETTINGS.default_theme || 'dark';
|
||||
if (dom.show95BandwidthInput) dom.show95BandwidthInput.value = window.SITE_SETTINGS.show_95_bandwidth ? "1" : "0";
|
||||
if (dom.p95TypeSelect) dom.p95TypeSelect.value = window.SITE_SETTINGS.p95_type || 'tx';
|
||||
if (dom.icpFilingInput) dom.icpFilingInput.value = window.SITE_SETTINGS.icp_filing || '';
|
||||
if (dom.psFilingInput) dom.psFilingInput.value = window.SITE_SETTINGS.ps_filing || '';
|
||||
// Latency routes loaded separately in openSettings or on startup
|
||||
}
|
||||
|
||||
@@ -1639,6 +1653,8 @@
|
||||
networkChart.draw();
|
||||
}
|
||||
}
|
||||
if (dom.icpFilingInput) dom.icpFilingInput.value = settings.icp_filing || '';
|
||||
if (dom.psFilingInput) dom.psFilingInput.value = settings.ps_filing || '';
|
||||
|
||||
// Apply to UI
|
||||
applySiteSettings(settings);
|
||||
@@ -1726,6 +1742,25 @@
|
||||
applyTheme(settings.default_theme);
|
||||
}
|
||||
}
|
||||
|
||||
// Filing info
|
||||
if (dom.icpFilingDisplay) {
|
||||
if (settings.icp_filing) {
|
||||
dom.icpFilingDisplay.textContent = settings.icp_filing;
|
||||
dom.icpFilingDisplay.style.display = 'inline-block';
|
||||
} else {
|
||||
dom.icpFilingDisplay.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
if (dom.psFilingDisplay) {
|
||||
if (settings.ps_filing) {
|
||||
if (dom.psFilingText) dom.psFilingText.textContent = settings.ps_filing;
|
||||
dom.psFilingDisplay.style.display = 'inline-block';
|
||||
} else {
|
||||
dom.psFilingDisplay.style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function saveSiteSettings() {
|
||||
@@ -1741,7 +1776,9 @@
|
||||
logo_url: dom.logoUrlInput.value.trim(),
|
||||
default_theme: dom.defaultThemeInput.value,
|
||||
show_95_bandwidth: dom.show95BandwidthInput.value === "1" ? 1 : 0,
|
||||
p95_type: dom.p95TypeSelect.value
|
||||
p95_type: dom.p95TypeSelect.value,
|
||||
icp_filing: dom.icpFilingInput ? dom.icpFilingInput.value : '',
|
||||
ps_filing: dom.psFilingInput ? dom.psFilingInput.value : ''
|
||||
};
|
||||
|
||||
// If user sets default to auto, we should clear their manual override or set it to auto
|
||||
|
||||
Reference in New Issue
Block a user