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 }, },