migrate: convert most components to svelte 5

This commit is contained in:
Xylight committed 2024-10-25 19:33:27 -07:00
1 parent d670f39f0a
commit 10ef4123da
225 files changed
+5441 -3341

No files matched your search

+26 -14
View File
@@ -5,16 +5,22 @@
import LabelStat from "$lib/components/ui/LabelStat.svelte"
import Expandable from "$lib/components/ui/Expandable.svelte"
export let open: boolean = false
export let data: Data
interface Props {
open?: boolean;
data: Data;
}
let { open = $bindable(false), data }: Props = $props();
</script>
<Modal bind:open title="Fediseer">
<div class="flex flex-col [&>*]:py-2 divide-y divide-slate-300 dark:divide-zinc-800">
<Expandable class="flex flex-col gap-4">
<SectionTitle class="flex gap-2 items-center flex-row" slot="title">
Endorsements <Badge class="w-max h-max" color="green-subtle">{data.endorsements.instances.length}</Badge>
</SectionTitle>
{#snippet title()}
<SectionTitle class="flex gap-2 items-center flex-row" >
Endorsements <Badge class="w-max h-max" color="green-subtle">{data.endorsements.instances.length}</Badge>
</SectionTitle>
{/snippet}
<div class="flex flex-row gap-6 flex-wrap">
{#each data.endorsements.instances as instance}
<div class="flex flex-col">
@@ -29,9 +35,11 @@
</div>
</Expandable>
<Expandable class="flex flex-col gap-4">
<SectionTitle class="flex gap-2 items-center flex-row" slot="title">
Guarantees <Badge class="w-max h-max" color="green-subtle">{data.guarantees.instances.length}</Badge>
</SectionTitle>
{#snippet title()}
<SectionTitle class="flex gap-2 items-center flex-row" >
Guarantees <Badge class="w-max h-max" color="green-subtle">{data.guarantees.instances.length}</Badge>
</SectionTitle>
{/snippet}
<div class="flex flex-row gap-6 flex-wrap">
{#each data.guarantees.instances as instance}
<div class="flex flex-col">
@@ -46,9 +54,11 @@
</div>
</Expandable>
<Expandable class="flex flex-col gap-4">
<SectionTitle class="flex gap-2 items-center flex-row" slot="title">
Censures <Badge class="w-max h-max" color="red-subtle">{data.censures.instances.length}</Badge>
</SectionTitle>
{#snippet title()}
<SectionTitle class="flex gap-2 items-center flex-row" >
Censures <Badge class="w-max h-max" color="red-subtle">{data.censures.instances.length}</Badge>
</SectionTitle>
{/snippet}
<div class="flex flex-row gap-6 flex-wrap">
{#each data.censures.instances as instance}
<div class="flex flex-col">
@@ -63,9 +73,11 @@
</div>
</Expandable>
<Expandable class="flex flex-col gap-4">
<SectionTitle class="flex gap-2 items-center flex-row" slot="title">
Hesitations <Badge class="w-max h-max" color="red-subtle">{data.hesitations.instances.length}</Badge>
</SectionTitle>
{#snippet title()}
<SectionTitle class="flex gap-2 items-center flex-row" >
Hesitations <Badge class="w-max h-max" color="red-subtle">{data.hesitations.instances.length}</Badge>
</SectionTitle>
{/snippet}
<div class="flex flex-row gap-6 flex-wrap">
{#each data.hesitations.instances as instance}
<div class="flex flex-col">