From dc9df32a3796f1d012c5244f1877d4ed402622bd Mon Sep 17 00:00:00 2001
From: Matthias Nott <mnott@mnsoft.org>
Date: Sun, 22 Feb 2026 00:34:47 +0100
Subject: [PATCH] feat: add version display and cache-busting to dashboard

---
 static/index.html |    6 +++---
 static/js/app.js  |    5 ++++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/static/index.html b/static/index.html
index a043346..7d7d251 100644
--- a/static/index.html
+++ b/static/index.html
@@ -88,8 +88,8 @@
         Restore
       </a>
     </nav>
-    <div class="sidebar-footer">
-      <a onclick="doLogout()" style="color:#9ca3af;cursor:pointer;">Logout</a>
+    <div class="sidebar-footer" id="sidebar-footer">
+      <a onclick="doLogout()" style="color:#9ca3af;cursor:pointer;">Logout</a><div id="app-version" style="margin-top:0.5rem;color:#4b5563;font-size:0.625rem;"></div>
     </div>
   </aside>
 
@@ -139,6 +139,6 @@
   </div>
 </div>
 
-<script src="/static/js/app.js"></script>
+<script src="/static/js/app.js?v=4"></script>
 </body>
 </html>
diff --git a/static/js/app.js b/static/js/app.js
index 69566b8..9facb3a 100644
--- a/static/js/app.js
+++ b/static/js/app.js
@@ -1,7 +1,8 @@
 'use strict';
+const APP_VERSION = 'v4-20260222';
 
 // ============================================================
-// OPS Dashboard — Vanilla JS Application (v3)
+// OPS Dashboard — Vanilla JS Application (v4)
 // ============================================================
 
 // ---------------------------------------------------------------------------
@@ -107,6 +108,7 @@
       allServices = data;
       document.getElementById('login-overlay').style.display = 'none';
       document.getElementById('app').style.display = 'flex';
+      const vEl = document.getElementById('app-version'); if (vEl && typeof APP_VERSION !== 'undefined') vEl.textContent = APP_VERSION;
       showPage('dashboard');
       startAutoRefresh();
     })
@@ -793,6 +795,7 @@
         allServices = data;
         document.getElementById('login-overlay').style.display = 'none';
         document.getElementById('app').style.display = 'flex';
+      const vEl = document.getElementById('app-version'); if (vEl && typeof APP_VERSION !== 'undefined') vEl.textContent = APP_VERSION;
         showPage('dashboard');
         startAutoRefresh();
       })

--
Gitblit v1.3.1