refactor: update forms and other areas to use new shadcn components (#1115)

Co-authored-by: Elias Schneider <login@eliasschneider.com>
Co-authored-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Kyle Mendell
2026-01-02 10:45:08 -06:00
committed by GitHub
parent 894eaf3cff
commit 386add08c4
60 changed files with 1427 additions and 783 deletions

View File

@@ -4,7 +4,7 @@
import Qrcode from '$lib/components/qrcode/qrcode.svelte';
import { Button } from '$lib/components/ui/button';
import * as Dialog from '$lib/components/ui/dialog';
import Label from '$lib/components/ui/label/label.svelte';
import * as Field from '$lib/components/ui/field';
import * as Select from '$lib/components/ui/select/index.js';
import { Separator } from '$lib/components/ui/separator';
import { m } from '$lib/paraglide/messages';
@@ -78,14 +78,14 @@
</Dialog.Header>
{#if oneTimeLink === null}
<div>
<Label for="expiration">{m.expiration()}</Label>
<Field.Field>
<Field.Label for="expiration">{m.expiration()}</Field.Label>
<Select.Root
type="single"
value={Object.keys(availableExpirations)[0]}
onValueChange={(v) => (selectedExpiration = v! as keyof typeof availableExpirations)}
>
<Select.Trigger id="expiration" class="w-full h-9">
<Select.Trigger id="expiration" class="w-full">
{selectedExpiration}
</Select.Trigger>
<Select.Content>
@@ -94,7 +94,7 @@
{/each}
</Select.Content>
</Select.Root>
</div>
</Field.Field>
<Dialog.Footer class="mt-2">
{#if $appConfigStore.emailOneTimeAccessAsAdminEnabled}
<Button
@@ -115,7 +115,7 @@
<p class="text-3xl font-bold">{code}</p>
</CopyToClipboard>
<div class="flex items-center justify-center gap-3 my-2 text-muted-foreground">
<div class="text-muted-foreground my-2 flex items-center justify-center gap-3">
<Separator />
<p class="text-xs text-nowrap">{m.or_visit()}</p>
<Separator />