add online/offline since

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-09-29 11:45:58 -04:00
parent 206c795207
commit 00fa1dc59e
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -2,11 +2,13 @@ async function updateIndicator(online, data, msg) {
const el = document.getElementById('logo_nav');
if (!el || !data) return;
const status = online ? '<b style="color:lime">online</b>' : '<b style="color:darkred">offline</b>';
const date = new Date();
const template = `
Version: <b>${data.updated}</b><br>
Commit: <b>${data.hash}</b><br>
Branch: <b>${data.branch}</b><br>
Status: ${status}<br>
Since: ${date.toLocaleString()}<br>
`;
if (online) {
el.dataset.hint = template;