0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch.git synced 2025-01-09 06:10:07 -05:00

Add version footer

This commit is contained in:
dragongoose 2023-07-18 20:26:32 -04:00
parent 8b78363784
commit 87ca3b79d6
No known key found for this signature in database
GPG key ID: 01397EEC371CDAA5
4 changed files with 24 additions and 3 deletions

View file

@ -9,7 +9,7 @@
<link rel="manifest" href="/site.webmanifest"> <link rel="manifest" href="/site.webmanifest">
<title>SafeTwitch</title> <title>SafeTwitch</title>
</head> </head>
<body class="bg-ctp-base"> <body class="bg-ctp-base flex flex-col">
<div id="app"></div> <div id="app"></div>
<script type="module" src="/src/main.ts"></script> <script type="module" src="/src/main.ts"></script>
</body> </body>

View file

@ -1,6 +1,6 @@
{ {
"name": "test", "name": "test",
"version": "0.0.0", "version": "1.1.3",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "run-p type-check build-only", "build": "run-p type-check build-only",

View file

@ -1,16 +1,19 @@
<script setup lang="ts"> <script setup lang="ts">
import { RouterView } from 'vue-router' import { RouterView } from 'vue-router'
import NavbarItem from './components/NavbarView.vue' import NavbarItem from './components/NavbarView.vue'
import FooterItem from './components/FooterView.vue'
import DevWarning from './components/DevWarning.vue' import DevWarning from './components/DevWarning.vue'
const dev = import.meta.env.DEV const dev = import.meta.env.DEV
</script> </script>
<template class="bg-ctp-base h-full"> <template class="bg-ctp-base h-full flex flex-row">
<dev-warning v-if="dev"></dev-warning> <dev-warning v-if="dev"></dev-warning>
<navbar-item></navbar-item> <navbar-item></navbar-item>
<Suspense> <Suspense>
<RouterView :key="$route.fullPath" /> <RouterView :key="$route.fullPath" />
</Suspense> </Suspense>
<footer-item></footer-item>
</template> </template>

View file

@ -0,0 +1,18 @@
<script lang="ts">
import { inject } from 'vue'
export default {
setup() {
const version = inject('version')
return {
version
}
}
}
</script>
<template>
<div class="m-2 mt-5 flex justify-center">
<p class="text-white font-bold">SafeTwitch v{{ version }}</p>
</div>
</template>