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 <noreply@anthropic.com>
This commit is contained in:
@@ -85,6 +85,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="app-version">v{{ appVersion }}</div>
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
@@ -127,6 +128,8 @@ import DiscoveryModal from './components/DiscoveryModal.vue'
|
|||||||
import LoginPage from './components/LoginPage.vue'
|
import LoginPage from './components/LoginPage.vue'
|
||||||
import AccountModal from './components/AccountModal.vue'
|
import AccountModal from './components/AccountModal.vue'
|
||||||
|
|
||||||
|
const appVersion = __APP_VERSION__
|
||||||
|
|
||||||
const view = ref('topology')
|
const view = ref('topology')
|
||||||
const vlans = ref([])
|
const vlans = ref([])
|
||||||
const devices = ref([])
|
const devices = ref([])
|
||||||
@@ -454,6 +457,14 @@ nav {
|
|||||||
}
|
}
|
||||||
.logout-btn:hover { background: #7F1D1D; color: #FCA5A5; }
|
.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 {
|
.main-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
|
import { readFileSync } from 'fs'
|
||||||
|
|
||||||
|
const pkg = JSON.parse(readFileSync('./package.json', 'utf-8'))
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [vue()],
|
plugins: [vue()],
|
||||||
|
define: {
|
||||||
|
__APP_VERSION__: JSON.stringify(pkg.version),
|
||||||
|
},
|
||||||
build: {
|
build: {
|
||||||
modulePreload: { polyfill: false },
|
modulePreload: { polyfill: false },
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user