-
-
Notifications
You must be signed in to change notification settings - Fork 424
Expand file tree
/
Copy pathBuildEnvironment.vue
More file actions
42 lines (39 loc) · 1.2 KB
/
BuildEnvironment.vue
File metadata and controls
42 lines (39 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<script setup lang="ts">
defineProps<{
footer?: boolean
}>()
const buildInfo = useAppConfig().buildInfo
</script>
<template>
<div
class="font-mono text-xs text-fg-muted flex items-center gap-2 motion-safe:animate-fade-in motion-safe:animate-fill-both"
:class="footer ? 'mt-4 justify-start' : 'mb-8 justify-center'"
style="animation-delay: 0.05s"
>
<i18n-t keypath="built_at" scope="global">
<DateTimeButton :datetime="buildInfo.time" />
</i18n-t>
<span>·</span>
<NuxtLink
v-if="buildInfo.env === 'release'"
external
:href="`https://github.com/npmx-dev/npmx.dev/tag/v${buildInfo.version}`"
target="_blank"
class="hover:text-fg transition-colors"
>
v{{ buildInfo.version }}
</NuxtLink>
<span v-else class="tracking-wider">{{ buildInfo.env }}</span>
<template v-if="buildInfo.commit && buildInfo.branch !== 'release'">
<span>·</span>
<NuxtLink
external
:href="`https://github.com/npmx-dev/npmx.dev/commit/${buildInfo.commit}`"
target="_blank"
class="hover:text-fg transition-colors"
>
{{ buildInfo.shortCommit }}
</NuxtLink>
</template>
</div>
</template>