refactor: use nuxt compatiable 4 folder
This commit is contained in:
20
app/components/layout/CurrentVersion.vue
Normal file
20
app/components/layout/CurrentVersion.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<script lang="ts" setup>
|
||||
import pkg from '~/../package.json'
|
||||
|
||||
const commitSha = (import.meta.env.VITE_COMMIT_REF || '').slice(0, 7)
|
||||
const now = import.meta.env.VITE_APP_BUILD_TIME
|
||||
const buildDate = (new Date(Number.parseInt(now))).toLocaleDateString()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="commitSha && buildDate" mb-2 text-sm>
|
||||
<span>
|
||||
当前版本 v{{ pkg.version }}({{ buildDate }}):
|
||||
</span>
|
||||
<span>
|
||||
<a border="b-1 dashed" :href="`https://github.com/YunYouJun/cook/commit/${commitSha}`" target="_blank" alt="Cook | GitHub Commit">
|
||||
{{ commitSha }}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
22
app/components/layout/SimpleCopyright.vue
Normal file
22
app/components/layout/SimpleCopyright.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<div text="center sm" my-3>
|
||||
<CurrentVersion />
|
||||
<div flex="~" items-center justify-center gap="2">
|
||||
<a
|
||||
href="https://github.com/YunYouJun/cook" target="_blank"
|
||||
class="inline-flex items-center justify-center"
|
||||
>
|
||||
<div i-ri-github-line mr-1 />
|
||||
<span>Code</span>
|
||||
</a>
|
||||
by
|
||||
<a
|
||||
href="https://www.bilibili.com/opus/649847454294868008" target="_blank"
|
||||
class="inline-flex items-center justify-center"
|
||||
>
|
||||
<div i-ri-bilibili-line mr-1 class="text-pink-400" />
|
||||
<span>云游君</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user