Add scan status badge

This commit is contained in:
iamdoubz committed 2026-11-05 16:08:38 -06:00
1 parent 6201730be9
commit 273ed3a632
1 file changed
+14
+14
View File
@@ -0,0 +1,14 @@
<script lang="ts">
import type { Scan } from '../lib/api';
let { status }: { status: Scan['status'] } = $props();
const look = {
queued: ['info', 'Reading…'],
parsed: ['warn', 'Ready to review'],
reviewed: ['warn', 'In review'],
published: ['ok', 'Published'],
failed: ['danger', 'Failed'],
abandoned: ['', 'Discarded'],
} as const;
</script>
<span class="badge {look[status][0]}">{look[status][1]}</span>