Add live mode toggle for real-time chart updates

Introduced a new "Live" button to enable real-time chart updates, refreshing data every second. Refactored data fetching to use `useRef` for `refresh` and updated styles for the live mode button, ensuring a seamless user experience.
This commit is contained in:
2026-02-12 13:57:32 +01:00
parent 5674f2ea45
commit 7957052172
2 changed files with 81 additions and 13 deletions

View File

@@ -1157,12 +1157,27 @@ td {
display: flex;
gap: 8px;
margin-bottom: 10px;
align-items: center;
}
.range-picker .active {
border-color: var(--accent);
}
.live-btn {
font-weight: 800;
letter-spacing: 0.04em;
border-color: #2da55e;
background: linear-gradient(180deg, #103725, #0d2a1d);
color: #bdf7d3;
}
.live-btn.active {
border-color: #4de08d;
background: linear-gradient(180deg, #1b7a4a, #145f3a);
box-shadow: 0 0 0 2px #2ee68f33;
}
.login-wrap {
min-height: 100vh;
display: grid;