From d5a90f6f1d9d7916cf95b3fd80766d8cb6370fca Mon Sep 17 00:00:00 2001 From: Olivier Date: Mon, 18 May 2026 16:45:52 +0200 Subject: [PATCH] feat: display semantic version in sidebar footer Reads version from package.json via Vite's define (__APP_VERSION__) and shows it as a small label at the bottom of the sidebar. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/App.vue | 11 +++++++++++ frontend/vite.config.js | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index beb5c48..03a1b2a 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -85,6 +85,7 @@ +
v{{ appVersion }}
@@ -127,6 +128,8 @@ import DiscoveryModal from './components/DiscoveryModal.vue' import LoginPage from './components/LoginPage.vue' import AccountModal from './components/AccountModal.vue' +const appVersion = __APP_VERSION__ + const view = ref('topology') const vlans = ref([]) const devices = ref([]) @@ -454,6 +457,14 @@ nav { } .logout-btn:hover { background: #7F1D1D; color: #FCA5A5; } +.app-version { + text-align: center; + font-size: 10px; + color: #475569; + margin-top: 6px; + letter-spacing: 0.03em; +} + .main-content { flex: 1; overflow: hidden; diff --git a/frontend/vite.config.js b/frontend/vite.config.js index e8217ad..3344e8b 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -1,8 +1,14 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import { readFileSync } from 'fs' + +const pkg = JSON.parse(readFileSync('./package.json', 'utf-8')) export default defineConfig({ plugins: [vue()], + define: { + __APP_VERSION__: JSON.stringify(pkg.version), + }, build: { modulePreload: { polyfill: false }, },