blob: 3e939356c8ccb4cf2bee4b768dc8d72db3d3359b (
plain) (
blame)
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
|
<script lang="ts">
import type {ProjectStatus} from "$models/projects/ProjectStatus";
import Badge from "./badge.svelte";
export let status: string | ProjectStatus;
let text = "";
let type = "default" as any;
$: switch (status) {
case "idl":
type = "tame";
text = "IDLE";
break;
case "exp":
type = "yellow";
text = "EXPIRED";
break;
case "act":
type = "green";
text = "ACTIVE";
break;
}
</script>
<Badge {text} {type} uppercase/>
|