mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-02 22:03:01 +02:00
The "Running config has unsaved changes" banner kept showing after a power cycle even though the device reloaded running from startup at boot. The cookie was just "1" with a 24-hour MaxAge, so the browser held on to it and the banner stayed up — but the state it referred to was long gone. Carry a unix timestamp in the cookie value (when set) and compare against a webuiStartTime captured at process start. Cookies whose timestamp predates this run are from a previous boot or webui restart; running was reloaded from startup since then, so they no longer describe reality and the banner must stay hidden. - Apply / Restore-to-running: cookie = now → banner shown. - Power cycle, page load: webuiStartTime > cookie ts → banner hidden. - Save / Apply-and-Save: cookie cleared (unchanged). - Legacy "1" / unparseable values: treated as stale. Also centre the "Device unreachable" connectivity banner past the sidebar on desktop — left:0 leaves its text drifting behind the sidebar's z-index. On ≤1024px the sidebar slides off-screen so the banner reclaims full width. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>