feat(ui): badge version visible + FAB AI flottant
CI / lint (push) Successful in 37s
CI / security (push) Successful in 25s
CI / test (push) Successful in 48s
CI / build (push) Successful in 21s
CI / e2e (push) Successful in 6m4s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s

This commit is contained in:
2026-09-07 14:37:37 -04:00
parent 5350738c22
commit 2d70be0ae2
7 changed files with 158 additions and 14 deletions
+9 -5
View File
@@ -5,6 +5,8 @@
import * as UI from './ui.js';
import * as Utils from './utils.js';
import { initI18n, t } from './i18n.js';
import { state } from './state.js';
import { initAIFab } from './ai-fab.js';
// Wire up AI toolbar toast (avoids circular import in utils.js)
window._obsigateShowToast = UI.showToast;
@@ -99,6 +101,7 @@ async function init() {
initMermaid();
setupFocusMode();
Utils.safeCreateIcons();
initAIFab();
}
document.addEventListener("DOMContentLoaded", () => {
@@ -111,15 +114,16 @@ document.addEventListener("DOMContentLoaded", () => {
window.__OBSIGATE_BOOTED = true;
if (typeof window.__obsigateBootReady === "function") window.__obsigateBootReady();
}
// Show version in header
// Show version in header — always visible, fallback before the async fetch
const versionBadge = document.getElementById('version-badge');
if (versionBadge) {
versionBadge.textContent = window.__OBSIGATE_VERSION || state.APP_VERSION || 'dev';
}
fetch('/api/health')
.then(r => r.json())
.then(d => {
const badge = document.getElementById('version-badge');
if (badge && d.version) {
badge.textContent = d.version;
badge.style.display = 'inline-block';
}
if (badge && d.version) badge.textContent = d.version;
})
.catch(() => {});
});