Add scan status badge
This commit is contained in:
1 parent
6201730be9
commit
273ed3a632
1 file changed
+14
@@ -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>
|
||||
Reference in new issue
Block a user