mirror of
https://github.com/versia-pub/frontend.git
synced 2026-06-14 15:39:15 +02:00
chore: ⬆️ Upgrade to Nuxt 4
Some checks failed
Some checks failed
This commit is contained in:
parent
8debe97f63
commit
7f7cf20311
386 changed files with 2376 additions and 2332 deletions
37
app/components/preferences/stats.vue
Normal file
37
app/components/preferences/stats.vue
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<template>
|
||||
<Card class="grid gap-3 text-sm max-w-sm">
|
||||
<dl class="grid gap-3">
|
||||
<div v-for="[key, value] of data" :key="key" class="flex flex-row items-baseline justify-between gap-4 truncate">
|
||||
<dt class="text-muted-foreground">
|
||||
{{ key }}
|
||||
</dt>
|
||||
<dd class="font-mono" v-if="typeof value === 'string'">{{ value }}</dd>
|
||||
<dd class="font-mono" v-else>
|
||||
<component :is="value" />
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
<script lang="tsx" setup>
|
||||
import type { VNode } from "vue";
|
||||
import pkg from "~~/package.json";
|
||||
import { Card } from "../ui/card";
|
||||
|
||||
const data: [string, string | VNode][] = [
|
||||
["Version", pkg.version],
|
||||
["Licence", pkg.license],
|
||||
["Author", pkg.author.name],
|
||||
[
|
||||
"Repository",
|
||||
<a
|
||||
href={pkg.repository.url.replace("git+", "")}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
{pkg.repository.url.replace("git+", "").replace("https://", "")}
|
||||
</a>,
|
||||
],
|
||||
];
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue