mirror of
https://codeberg.org/SafeTwitch/safetwitch.git
synced 2025-01-08 22:00:14 -05:00
Add version footer
This commit is contained in:
parent
8b78363784
commit
87ca3b79d6
4 changed files with 24 additions and 3 deletions
|
@ -9,7 +9,7 @@
|
|||
<link rel="manifest" href="/site.webmanifest">
|
||||
<title>SafeTwitch</title>
|
||||
</head>
|
||||
<body class="bg-ctp-base">
|
||||
<body class="bg-ctp-base flex flex-col">
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "test",
|
||||
"version": "0.0.0",
|
||||
"version": "1.1.3",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "run-p type-check build-only",
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
<script setup lang="ts">
|
||||
import { RouterView } from 'vue-router'
|
||||
import NavbarItem from './components/NavbarView.vue'
|
||||
import FooterItem from './components/FooterView.vue'
|
||||
import DevWarning from './components/DevWarning.vue'
|
||||
|
||||
const dev = import.meta.env.DEV
|
||||
</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>
|
||||
<navbar-item></navbar-item>
|
||||
|
||||
<Suspense>
|
||||
<RouterView :key="$route.fullPath" />
|
||||
</Suspense>
|
||||
|
||||
<footer-item></footer-item>
|
||||
</template>
|
||||
|
|
18
src/components/FooterView.vue
Normal file
18
src/components/FooterView.vue
Normal 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>
|
Loading…
Reference in a new issue