refactor: env config (#769)

This commit is contained in:
三咲智子 Kevin Deng 2023-01-04 21:26:30 +08:00 committed by GitHub
parent 9d5dc1bc3d
commit f892722220
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 121 additions and 64 deletions

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import buildInfo from 'virtual:build-info'
import { buildInfo } from 'virtual:build-info'
const timeAgoOptions = useTimeAgoOptions()
@ -35,10 +35,10 @@ function toggleDark() {
<span v-else>
{{ $t('nav.built_at', [$d(buildTimeDate, 'shortDate')]) }}
</span>
<template v-if="buildInfo.version">
&middot;
v{{ buildInfo.version }}
</template>
&middot;
<!-- TODO click version to show changelog -->
<span v-if="buildInfo.env === 'release'">v{{ buildInfo.version }}</span>
<span v-else>{{ buildInfo.env }}</span>
<template v-if="buildInfo.commit && buildInfo.branch !== 'release'">
&middot;
<NuxtLink