chore: add simple copyright

This commit is contained in:
YunYouJun
2023-11-06 01:19:43 +08:00
parent 246a65599a
commit f2f878e2f4
7 changed files with 36 additions and 20 deletions

View File

@@ -0,0 +1,21 @@
<script lang="ts" setup>
import { isClient } from '@vueuse/core'
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) * 1000)).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>