feat: add version badge to header displaying app version from package.json

This commit is contained in:
Trevor Mears
2026-01-11 23:31:34 -08:00
parent 5f24d7e264
commit 098dc3a8ce
4 changed files with 27 additions and 0 deletions
+9
View File
@@ -238,4 +238,13 @@ class App {
// Start app when DOM is ready
document.addEventListener('DOMContentLoaded', () => {
window.app = new App();
// Fetch and display version badge
fetch('/api/version')
.then(res => res.json())
.then(data => {
const badge = document.getElementById('version-badge');
if (badge && data.version) badge.textContent = `v${data.version}`;
})
.catch(() => { });
});