feat: display app version from package.json in footer

This commit is contained in:
2026-02-10 17:24:19 +01:00
parent d0e290a371
commit 892ee52efb
2 changed files with 16 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ const installDismissed = ref(false);
const isCoarsePointer = ref(false);
const isStandalone = ref(false);
const themePreference = ref('system');
const appVersion = __APP_VERSION__;
let displayModeMedia = null;
let prefersColorSchemeMedia = null;
@@ -164,6 +165,10 @@ onUnmounted(() => {
</section>
</div>
<footer class="app-version">
v{{ appVersion }}
</footer>
<!-- Modals Teleport -->
<Teleport to="body">
<WinModal v-if="store.isGameWon" />
@@ -238,4 +243,12 @@ onUnmounted(() => {
.fade-leave-to {
opacity: 0;
}
.app-version {
margin-top: auto;
padding: 10px;
font-size: 0.8rem;
color: var(--text-muted);
opacity: 0.6;
}
</style>

View File

@@ -4,6 +4,9 @@ import { VitePWA } from 'vite-plugin-pwa'
import path from 'path'
export default defineConfig({
define: {
'__APP_VERSION__': JSON.stringify(process.env.npm_package_version)
},
plugins: [
vue(),
VitePWA({