Skip to content

Commit

Permalink
added version info
Browse files Browse the repository at this point in the history
  • Loading branch information
r0light committed Apr 15, 2024
1 parent 9f394bd commit f92429c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare const APP_VERSION: string;
13 changes: 12 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<header>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark text-white">
<div class="navbar-header">
<a class="navbar-brand text-muted"><i class="fa-solid fa-cube"></i> Clounaq</a>
<a class="navbar-brand text-muted no-line-space"><i class="fa-solid fa-cube"></i> Clounaq <br><span class="versionInfo">v{{ version }}</span></a>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
Expand Down Expand Up @@ -140,6 +140,7 @@ export type ModelingData = {
}
const CLOUNAQ = "Clounaq";
const version = APP_VERSION;
const router = useRouter();
Expand Down Expand Up @@ -522,6 +523,16 @@ function deleteModelingPage(id: number) {
display: contents;
}
.no-line-space {
line-height: 0.4em;
}
.versionInfo {
font-size: x-small;
margin-left: 6.5em;
color: white;
}
#vapp {
display: flex;
flex-direction: column;
Expand Down
5 changes: 4 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ export default defineConfig({
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
publicDir: "public"
publicDir: "public",
define: {
APP_VERSION: JSON.stringify(process.env.npm_package_version),
},
})
2 changes: 1 addition & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
],
test: {
globals: true,
environment: 'jsdom',
environment: 'jsdom'
/*
browser: {
enabled: true,
Expand Down

0 comments on commit f92429c

Please sign in to comment.