移除顶部时间
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="clock" id="clock"></div>
|
||||
|
||||
<div class="theme-switch-wrapper">
|
||||
<label class="theme-switch" for="themeToggle">
|
||||
<input type="checkbox" id="themeToggle" />
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
// ---- DOM Elements ----
|
||||
const dom = {
|
||||
clock: document.getElementById('clock'),
|
||||
clock: document.getElementById('clock'), // May be null if removed from UI
|
||||
serverCountText: document.getElementById('serverCountText'),
|
||||
sourceCount: document.getElementById('sourceCount'),
|
||||
totalServers: document.getElementById('totalServers'),
|
||||
@@ -77,10 +77,6 @@
|
||||
// Add SVG gradient definitions for gauges
|
||||
addGaugeSvgDefs();
|
||||
|
||||
// Clock
|
||||
updateClock();
|
||||
setInterval(updateClock, 1000);
|
||||
|
||||
// Resource Gauges Time
|
||||
updateGaugesTime();
|
||||
setInterval(updateGaugesTime, 1000);
|
||||
@@ -296,7 +292,9 @@
|
||||
|
||||
// ---- Clock ----
|
||||
function updateClock() {
|
||||
dom.clock.textContent = formatClock();
|
||||
if (dom.clock) {
|
||||
dom.clock.textContent = formatClock();
|
||||
}
|
||||
}
|
||||
|
||||
function updateGaugesTime() {
|
||||
|
||||
Reference in New Issue
Block a user