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

+22 -18
View File
@@ -17,29 +17,33 @@
import { t } from '$lib/translations'
import Header from '$lib/components/ui/layout/pages/Header.svelte'
export let data
let { data = $bindable() } = $props();
</script>
<div class="mb-4 flex flex-col gap-4">
<Header pageHeader>
{$t('routes.moderation.title')}
<div class="flex flex-row gap-2 flex-wrap items-end" slot="extended">
<Select
bind:value={data.type}
on:change={() => searchParam($page.url, 'type', data.type, 'page')}
>
<span slot="label" class="flex items-center gap-1">
<Icon src={Funnel} size="15" mini />
{$t('filter.filter')}
</span>
<option value="all">{$t('filter.location.all')}</option>
<option value="unread">{$t('filter.unread')}</option>
</Select>
<Button href="/modlog" class="h-max ml-auto">
<Icon src={Newspaper} size="16" mini />
{$t('routes.modlog')}
</Button>
</div>
{#snippet extended()}
<div class="flex flex-row gap-2 flex-wrap items-end" >
<Select
bind:value={data.type}
on:change={() => searchParam($page.url, 'type', data.type, 'page')}
>
{#snippet label()}
<span class="flex items-center gap-1">
<Icon src={Funnel} size="15" mini />
{$t('filter.filter')}
</span>
{/snippet}
<option value="all">{$t('filter.location.all')}</option>
<option value="unread">{$t('filter.unread')}</option>
</Select>
<Button href="/modlog" class="h-max ml-auto">
<Icon src={Newspaper} size="16" mini />
{$t('routes.modlog')}
</Button>
</div>
{/snippet}
</Header>
</div>
{#if data.items && data.items.length > 0}