frontend/app/components/preferences/stats.vue
Jesse Wierzbinski 7f7cf20311
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 1s
Deploy to GitHub Pages / build (push) Failing after 1s
Deploy to GitHub Pages / deploy (push) Has been skipped
Docker / build (push) Failing after 1s
Mirror to Codeberg / Mirror (push) Failing after 1s
chore: ⬆️ Upgrade to Nuxt 4
2025-07-16 07:48:39 +02:00

38 lines
1.1 KiB
Vue

<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>