Display version in frontend

This commit is contained in:
2026-03-04 18:02:29 +01:00
parent f10c0b03bf
commit 9044412de0
2 changed files with 4 additions and 1 deletions

1
front/.env Normal file
View File

@@ -0,0 +1 @@
VITE_APP_VERSION=$npm_package_version

View File

@@ -13,6 +13,8 @@ const router = useRouter()
const isMenuActive = ref(false) const isMenuActive = ref(false)
const isSearchBarShown = ref(false) const isSearchBarShown = ref(false)
const appVersion = import.meta.env.VITE_APP_VERSION;
function logout() { function logout() {
authStore.logout() authStore.logout()
router.push('/') router.push('/')
@@ -45,7 +47,7 @@ onMounted(() => {
<template> <template>
<nav class="navbar"> <nav class="navbar">
<div class="navbar-brand"> <div class="navbar-brand">
<RouterLink to="/" class="navbar-item" activeClass="is-active"> B </RouterLink> <RouterLink to="/" class="navbar-item" :title="'bibliomane v' + appVersion" activeClass="is-active"> B </RouterLink>
<div class="navbar-item is-hidden-desktop"> <div class="navbar-item is-hidden-desktop">
<a <a
@click="isSearchBarShown = !isSearchBarShown" @click="isSearchBarShown = !isSearchBarShown"