feat: show version on start page
This commit is contained in:
parent
72d61d7811
commit
0f517c5180
@ -1,4 +1,7 @@
|
||||
import { defineNuxtConfig } from 'nuxt'
|
||||
import fs from 'fs'
|
||||
const packageJson = fs.readFileSync('./package.json', 'utf-8')
|
||||
const version = JSON.parse(packageJson).version || 0
|
||||
|
||||
export default defineNuxtConfig({
|
||||
ssr: false,
|
||||
@ -10,6 +13,10 @@ export default defineNuxtConfig({
|
||||
buildModules: [
|
||||
'@pinia/nuxt'
|
||||
],
|
||||
publicRuntimeConfig: {
|
||||
serverBaseUrl: '/',
|
||||
version,
|
||||
},
|
||||
proxy: {
|
||||
'/api/': 'http://localhost:32039',
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "knowyt",
|
||||
"version": "1.21",
|
||||
"version": "2.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
|
@ -12,9 +12,17 @@
|
||||
</div>
|
||||
<div class="page-index__space" />
|
||||
</div>
|
||||
<div class="page-index__copyright-notice">
|
||||
v{{ config.version }}, © 2021-2022, Settel
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useRuntimeConfig } from '#app'
|
||||
const config = useRuntimeConfig()
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import '~/assets/css/components';
|
||||
|
||||
@ -32,7 +40,7 @@ body {
|
||||
height: 120px;
|
||||
}
|
||||
|
||||
&__login,
|
||||
&__login,
|
||||
&__create-team {
|
||||
width: 240px;
|
||||
align-self: center;
|
||||
@ -47,5 +55,12 @@ body {
|
||||
&__space {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
&__copyright-notice {
|
||||
position: absolute;
|
||||
right: 1em;
|
||||
bottom: 0;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user