feat: add app version in footer
This commit is contained in:
parent
d73da8c1bd
commit
0dccf7e86e
1
env.d.ts
vendored
1
env.d.ts
vendored
@ -1 +1,2 @@
|
|||||||
/// <reference types="vite/client" />
|
/// <reference types="vite/client" />
|
||||||
|
declare const __APP_VERSION__: string;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gege-jdr",
|
"name": "gege-jdr",
|
||||||
"version": "0.0.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -1,14 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<footer class="flex-row flex-spread card">
|
<footer class="flex-col flex-spread card gap-1rem">
|
||||||
<div id="copyright" class="small">Copyright © {{ currentYear }} Lucien Cartier-Tilet</div>
|
<div class="flex-row flex-spread">
|
||||||
<div id="source">
|
<div id="version" class="small">version {{ version }}</div>
|
||||||
<a class="highlight small" href="https://labs.phundrak.com/phundrak/gege-jdr">Source code</a>
|
<div id="copyright" class="small">
|
||||||
|
Copyright © {{ currentYear }} Lucien Cartier-Tilet
|
||||||
|
</div>
|
||||||
|
<div id="source">
|
||||||
|
<a class="highlight small" href="https://labs.phundrak.com/phundrak/gege-jdr"
|
||||||
|
>Source code</a
|
||||||
|
>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const currentYear = new Date().getFullYear();
|
const currentYear = new Date().getFullYear();
|
||||||
|
const version = __APP_VERSION__;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped="" lang="less">
|
<style scoped="" lang="less">
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
import { fileURLToPath, URL } from 'node:url'
|
import { fileURLToPath, URL } from 'node:url';
|
||||||
|
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite';
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [vue()],
|
||||||
vue(),
|
|
||||||
],
|
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
})
|
define: {
|
||||||
|
__APP_VERSION__: JSON.stringify(process.env.npm_package_version),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user