refactor: run formatter

This commit is contained in:
Elias Schneider
2025-05-07 16:43:24 +02:00
parent de648dd6da
commit e0db4695ac
105 changed files with 768 additions and 756 deletions

View File

@@ -24,7 +24,8 @@ const authenticationHandle: Handle = async ({ event, resolve }) => {
const { isSignedIn, isAdmin } = verifyJwt(event.cookies.get(ACCESS_TOKEN_COOKIE_NAME)); const { isSignedIn, isAdmin } = verifyJwt(event.cookies.get(ACCESS_TOKEN_COOKIE_NAME));
const path = event.url.pathname; const path = event.url.pathname;
const isUnauthenticatedOnlyPath = path == '/login' || path.startsWith('/login/') || path == '/lc' || path.startsWith('/lc/') const isUnauthenticatedOnlyPath =
path == '/login' || path.startsWith('/login/') || path == '/lc' || path.startsWith('/lc/');
const isPublicPath = ['/authorize', '/device', '/health', '/healthz'].includes(path); const isPublicPath = ['/authorize', '/device', '/health', '/healthz'].includes(path);
const isAdminPath = path == '/settings/admin' || path.startsWith('/settings/admin/'); const isAdminPath = path == '/settings/admin' || path.startsWith('/settings/admin/');
@@ -79,7 +80,7 @@ function verifyJwt(accessToken: string | undefined) {
const jwtPayload = decodeJwt<{ isAdmin: boolean }>(accessToken); const jwtPayload = decodeJwt<{ isAdmin: boolean }>(accessToken);
if (jwtPayload?.exp && jwtPayload.exp * 1000 > Date.now()) { if (jwtPayload?.exp && jwtPayload.exp * 1000 > Date.now()) {
isSignedIn = true; isSignedIn = true;
isAdmin = !!(jwtPayload?.isAdmin); isAdmin = !!jwtPayload?.isAdmin;
} }
} }

View File

@@ -29,7 +29,9 @@
</script> </script>
<Tooltip.Root closeOnPointerDown={false} {onOpenChange} {open}> <Tooltip.Root closeOnPointerDown={false} {onOpenChange} {open}>
<Tooltip.Trigger class="text-start" tabindex={-1} onclick={onClick}>{@render children()}</Tooltip.Trigger> <Tooltip.Trigger class="text-start" tabindex={-1} onclick={onClick}
>{@render children()}</Tooltip.Trigger
>
<Tooltip.Content onclick={copyToClipboard}> <Tooltip.Content onclick={copyToClipboard}>
{#if copied} {#if copied}
<span class="flex items-center"><LucideCheck class="mr-1 h-4 w-4" /> {m.copied()}</span> <span class="flex items-center"><LucideCheck class="mr-1 h-4 w-4" /> {m.copied()}</span>

View File

@@ -7,7 +7,7 @@
</script> </script>
<div class="mt-[20%] flex flex-col items-center"> <div class="mt-[20%] flex flex-col items-center">
<LucideXCircle class="h-12 w-12 text-muted-foreground" /> <LucideXCircle class="text-muted-foreground h-12 w-12" />
<h1 class="mt-3 text-2xl font-semibold">{m.something_went_wrong()}</h1> <h1 class="mt-3 text-2xl font-semibold">{m.something_went_wrong()}</h1>
<p class="text-muted-foreground">{message}</p> <p class="text-muted-foreground">{message}</p>
{#if showButton} {#if showButton}

View File

@@ -92,7 +92,7 @@
onkeydown={(e) => { onkeydown={(e) => {
if (e.key === 'Enter') handleSuggestionClick(suggestion); if (e.key === 'Enter') handleSuggestionClick(suggestion);
}} }}
class="relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 {selectedIndex === class="hover:bg-accent hover:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 {selectedIndex ===
index index
? 'bg-accent text-accent-foreground' ? 'bg-accent text-accent-foreground'
: ''}" : ''}"

View File

@@ -27,7 +27,7 @@
bind:checked bind:checked
/> />
<div class="grid gap-1.5 leading-none"> <div class="grid gap-1.5 leading-none">
<Label for={id} class="mb-0 text-sm font-medium leading-none"> <Label for={id} class="mb-0 text-sm leading-none font-medium">
{label} {label}
</Label> </Label>
{#if description} {#if description}

View File

@@ -24,7 +24,7 @@
<DropdownMenu.Content class="min-w-40" align="start"> <DropdownMenu.Content class="min-w-40" align="start">
<DropdownMenu.Label class="font-normal"> <DropdownMenu.Label class="font-normal">
<div class="flex flex-col space-y-1"> <div class="flex flex-col space-y-1">
<p class="text-sm font-medium leading-none"> <p class="text-sm leading-none font-medium">
{$userStore?.firstName} {$userStore?.firstName}
{$userStore?.lastName} {$userStore?.lastName}
</p> </p>

View File

@@ -50,7 +50,7 @@
</div> </div>
<!-- Background image with slide animation --> <!-- Background image with slide animation -->
<div class="{cn(animate && 'animate-slide-bg-container')} absolute bottom-0 right-0 top-0 z-0"> <div class="{cn(animate && 'animate-slide-bg-container')} absolute top-0 right-0 bottom-0 z-0">
<img <img
src="/api/application-configuration/background-image" src="/api/application-configuration/background-image"
class="h-screen rounded-l-[60px] object-cover {animate ? 'w-full' : 'w-[calc(100vw-650px)]'}" class="h-screen rounded-l-[60px] object-cover {animate ? 'w-full' : 'w-[calc(100vw-650px)]'}"

View File

@@ -116,7 +116,7 @@
<div class="text-muted-foreground my-2 flex items-center justify-center gap-3"> <div class="text-muted-foreground my-2 flex items-center justify-center gap-3">
<Separator /> <Separator />
<p class="text-nowrap text-xs">{m.or_visit()}</p> <p class="text-xs text-nowrap">{m.or_visit()}</p>
<Separator /> <Separator />
</div> </div>

View File

@@ -5,9 +5,9 @@
</script> </script>
<div class="flex items-center"> <div class="flex items-center">
<div class="mr-5 rounded-lg bg-muted p-2"><svelte:component this={icon} /></div> <div class="bg-muted mr-5 rounded-lg p-2"><svelte:component this={icon} /></div>
<div class="text-start"> <div class="text-start">
<h3 class="font-semibold">{name}</h3> <h3 class="font-semibold">{name}</h3>
<p class="text-sm text-muted-foreground">{description}</p> <p class="text-muted-foreground text-sm">{description}</p>
</div> </div>
</div> </div>

View File

@@ -18,7 +18,7 @@
{transition} {transition}
{transitionConfig} {transitionConfig}
class={cn( class={cn(
'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:rounded-lg md:w-full', 'bg-background fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg sm:rounded-lg md:w-full',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -9,7 +9,7 @@
</script> </script>
<AlertDialogPrimitive.Description <AlertDialogPrimitive.Description
class={cn('text-sm text-muted-foreground', className)} class={cn('text-muted-foreground text-sm', className)}
{...$$restProps} {...$$restProps}
> >
<slot /> <slot />

View File

@@ -16,6 +16,6 @@
<AlertDialogPrimitive.Overlay <AlertDialogPrimitive.Overlay
{transition} {transition}
{transitionConfig} {transitionConfig}
class={cn('fixed inset-0 z-50 bg-background/80 backdrop-blur-sm ', className)} class={cn('bg-background/80 fixed inset-0 z-50 backdrop-blur-sm ', className)}
{...$$restProps} {...$$restProps}
/> />

View File

@@ -14,7 +14,7 @@
<svelte:element <svelte:element
this={level} this={level}
class={cn('mb-1 font-medium leading-none tracking-tight', className)} class={cn('mb-1 leading-none font-medium tracking-tight', className)}
{...$$restProps} {...$$restProps}
> >
<slot /> <slot />

View File

@@ -37,7 +37,9 @@
<div class={cn(alertVariants({ variant }), className)} {...$$restProps} role="alert"> <div class={cn(alertVariants({ variant }), className)} {...$$restProps} role="alert">
<slot /> <slot />
{#if dismissibleId} {#if dismissibleId}
<button on:click={dismiss} class="absolute top-0 right-0 m-3 text-black dark:text-white"><LucideX class="w-4" /></button> <button on:click={dismiss} class="absolute top-0 right-0 m-3 text-black dark:text-white"
><LucideX class="w-4" /></button
>
{/if} {/if}
</div> </div>
{/if} {/if}

View File

@@ -9,7 +9,7 @@
</script> </script>
<AvatarPrimitive.Fallback <AvatarPrimitive.Fallback
class={cn('flex h-full w-full items-center justify-center rounded-full bg-muted', className)} class={cn('bg-muted flex h-full w-full items-center justify-center rounded-full', className)}
{...$$restProps} {...$$restProps}
> >
<slot /> <slot />

View File

@@ -1,18 +1,18 @@
<script lang="ts"> <script lang="ts">
import { Calendar as CalendarPrimitive } from "bits-ui"; import { Calendar as CalendarPrimitive } from 'bits-ui';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = CalendarPrimitive.CellProps; type $$Props = CalendarPrimitive.CellProps;
export let date: $$Props["date"]; export let date: $$Props['date'];
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>
<CalendarPrimitive.Cell <CalendarPrimitive.Cell
{date} {date}
class={cn( class={cn(
"[&:has([data-selected])]:bg-accent [&:has([data-selected][data-outside-month])]:bg-accent/50 relative h-9 w-9 p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:rounded-md", '[&:has([data-selected])]:bg-accent [&:has([data-selected][data-outside-month])]:bg-accent/50 relative h-9 w-9 p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:rounded-md',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -1,14 +1,14 @@
<script lang="ts"> <script lang="ts">
import { Calendar as CalendarPrimitive } from "bits-ui"; import { Calendar as CalendarPrimitive } from 'bits-ui';
import { buttonVariants } from "$lib/components/ui/button/index.js"; import { buttonVariants } from '$lib/components/ui/button/index.js';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = CalendarPrimitive.DayProps; type $$Props = CalendarPrimitive.DayProps;
type $$Events = CalendarPrimitive.DayEvents; type $$Events = CalendarPrimitive.DayEvents;
export let date: $$Props["date"]; export let date: $$Props['date'];
export let month: $$Props["month"]; export let month: $$Props['month'];
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>
@@ -17,17 +17,17 @@
{date} {date}
{month} {month}
class={cn( class={cn(
buttonVariants({ variant: "ghost" }), buttonVariants({ variant: 'ghost' }),
"h-9 w-9 p-0 font-normal ", 'h-9 w-9 p-0 font-normal ',
"[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground", '[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground',
// Selected // Selected
"data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:hover:bg-primary data-[selected]:hover:text-primary-foreground data-[selected]:focus:bg-primary data-[selected]:focus:text-primary-foreground data-[selected]:opacity-100", 'data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:hover:bg-primary data-[selected]:hover:text-primary-foreground data-[selected]:focus:bg-primary data-[selected]:focus:text-primary-foreground data-[selected]:opacity-100',
// Disabled // Disabled
"data-[disabled]:text-muted-foreground data-[disabled]:opacity-50", 'data-[disabled]:text-muted-foreground data-[disabled]:opacity-50',
// Unavailable // Unavailable
"data-[unavailable]:text-destructive-foreground data-[unavailable]:line-through", 'data-[unavailable]:text-destructive-foreground data-[unavailable]:line-through',
// Outside months // Outside months
"data-[outside-month]:text-muted-foreground [&[data-outside-month][data-selected]]:bg-accent/50 [&[data-outside-month][data-selected]]:text-muted-foreground data-[outside-month]:pointer-events-none data-[outside-month]:opacity-50 [&[data-outside-month][data-selected]]:opacity-30", 'data-[outside-month]:text-muted-foreground [&[data-outside-month][data-selected]]:bg-accent/50 [&[data-outside-month][data-selected]]:text-muted-foreground data-[outside-month]:pointer-events-none data-[outside-month]:opacity-50 [&[data-outside-month][data-selected]]:opacity-30',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -1,10 +1,10 @@
<script lang="ts"> <script lang="ts">
import { Calendar as CalendarPrimitive } from "bits-ui"; import { Calendar as CalendarPrimitive } from 'bits-ui';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = CalendarPrimitive.GridBodyProps; type $$Props = CalendarPrimitive.GridBodyProps;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>

View File

@@ -1,10 +1,10 @@
<script lang="ts"> <script lang="ts">
import { Calendar as CalendarPrimitive } from "bits-ui"; import { Calendar as CalendarPrimitive } from 'bits-ui';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = CalendarPrimitive.GridHeadProps; type $$Props = CalendarPrimitive.GridHeadProps;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>

View File

@@ -1,13 +1,13 @@
<script lang="ts"> <script lang="ts">
import { Calendar as CalendarPrimitive } from "bits-ui"; import { Calendar as CalendarPrimitive } from 'bits-ui';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = CalendarPrimitive.GridRowProps; type $$Props = CalendarPrimitive.GridRowProps;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>
<CalendarPrimitive.GridRow class={cn("flex", className)} {...$$restProps}> <CalendarPrimitive.GridRow class={cn('flex', className)} {...$$restProps}>
<slot /> <slot />
</CalendarPrimitive.GridRow> </CalendarPrimitive.GridRow>

View File

@@ -1,13 +1,13 @@
<script lang="ts"> <script lang="ts">
import { Calendar as CalendarPrimitive } from "bits-ui"; import { Calendar as CalendarPrimitive } from 'bits-ui';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = CalendarPrimitive.GridProps; type $$Props = CalendarPrimitive.GridProps;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>
<CalendarPrimitive.Grid class={cn("w-full border-collapse space-y-1", className)} {...$$restProps}> <CalendarPrimitive.Grid class={cn('w-full border-collapse space-y-1', className)} {...$$restProps}>
<slot /> <slot />
</CalendarPrimitive.Grid> </CalendarPrimitive.Grid>

View File

@@ -1,15 +1,15 @@
<script lang="ts"> <script lang="ts">
import { Calendar as CalendarPrimitive } from "bits-ui"; import { Calendar as CalendarPrimitive } from 'bits-ui';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = CalendarPrimitive.HeadCellProps; type $$Props = CalendarPrimitive.HeadCellProps;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>
<CalendarPrimitive.HeadCell <CalendarPrimitive.HeadCell
class={cn("text-muted-foreground w-9 rounded-md text-[0.8rem] font-normal", className)} class={cn('text-muted-foreground w-9 rounded-md text-[0.8rem] font-normal', className)}
{...$$restProps} {...$$restProps}
> >
<slot /> <slot />

View File

@@ -1,15 +1,15 @@
<script lang="ts"> <script lang="ts">
import { Calendar as CalendarPrimitive } from "bits-ui"; import { Calendar as CalendarPrimitive } from 'bits-ui';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = CalendarPrimitive.HeaderProps; type $$Props = CalendarPrimitive.HeaderProps;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>
<CalendarPrimitive.Header <CalendarPrimitive.Header
class={cn("relative flex w-full items-center justify-between pt-1", className)} class={cn('relative flex w-full items-center justify-between pt-1', className)}
{...$$restProps} {...$$restProps}
> >
<slot /> <slot />

View File

@@ -1,16 +1,16 @@
<script lang="ts"> <script lang="ts">
import { Calendar as CalendarPrimitive } from "bits-ui"; import { Calendar as CalendarPrimitive } from 'bits-ui';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = CalendarPrimitive.HeadingProps; type $$Props = CalendarPrimitive.HeadingProps;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>
<CalendarPrimitive.Heading <CalendarPrimitive.Heading
let:headingValue let:headingValue
class={cn("text-sm font-medium", className)} class={cn('text-sm font-medium', className)}
{...$$restProps} {...$$restProps}
> >
<slot {headingValue}> <slot {headingValue}>

View File

@@ -1,15 +1,15 @@
<script lang="ts"> <script lang="ts">
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = HTMLAttributes<HTMLDivElement>; type $$Props = HTMLAttributes<HTMLDivElement>;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>
<div <div
class={cn("mt-4 flex flex-col space-y-4 sm:flex-row sm:space-x-4 sm:space-y-0", className)} class={cn('mt-4 flex flex-col space-y-4 sm:flex-row sm:space-y-0 sm:space-x-4', className)}
{...$$restProps} {...$$restProps}
> >
<slot /> <slot />

View File

@@ -1,21 +1,21 @@
<script lang="ts"> <script lang="ts">
import { Calendar as CalendarPrimitive } from "bits-ui"; import { Calendar as CalendarPrimitive } from 'bits-ui';
import ChevronRight from "lucide-svelte/icons/chevron-right"; import ChevronRight from 'lucide-svelte/icons/chevron-right';
import { buttonVariants } from "$lib/components/ui/button/index.js"; import { buttonVariants } from '$lib/components/ui/button/index.js';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = CalendarPrimitive.NextButtonProps; type $$Props = CalendarPrimitive.NextButtonProps;
type $$Events = CalendarPrimitive.NextButtonEvents; type $$Events = CalendarPrimitive.NextButtonEvents;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>
<CalendarPrimitive.NextButton <CalendarPrimitive.NextButton
on:click on:click
class={cn( class={cn(
buttonVariants({ variant: "outline" }), buttonVariants({ variant: 'outline' }),
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100", 'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -1,21 +1,21 @@
<script lang="ts"> <script lang="ts">
import { Calendar as CalendarPrimitive } from "bits-ui"; import { Calendar as CalendarPrimitive } from 'bits-ui';
import ChevronLeft from "lucide-svelte/icons/chevron-left"; import ChevronLeft from 'lucide-svelte/icons/chevron-left';
import { buttonVariants } from "$lib/components/ui/button/index.js"; import { buttonVariants } from '$lib/components/ui/button/index.js';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = CalendarPrimitive.PrevButtonProps; type $$Props = CalendarPrimitive.PrevButtonProps;
type $$Events = CalendarPrimitive.PrevButtonEvents; type $$Events = CalendarPrimitive.PrevButtonEvents;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>
<CalendarPrimitive.PrevButton <CalendarPrimitive.PrevButton
on:click on:click
class={cn( class={cn(
buttonVariants({ variant: "outline" }), buttonVariants({ variant: 'outline' }),
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100", 'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -1,38 +1,34 @@
<script lang="ts"> <script lang="ts">
import * as Calendar from "$lib/components/ui/calendar/index.js"; import * as Calendar from '$lib/components/ui/calendar/index.js';
import * as Select from "$lib/components/ui/select/index.js"; import * as Select from '$lib/components/ui/select/index.js';
import { cn } from "$lib/utils/style"; import { cn } from '$lib/utils/style';
import { import { DateFormatter, getLocalTimeZone, today } from '@internationalized/date';
DateFormatter, import { Calendar as CalendarPrimitive } from 'bits-ui';
getLocalTimeZone,
today
} from "@internationalized/date";
import { Calendar as CalendarPrimitive } from "bits-ui";
type $$Props = CalendarPrimitive.Props; type $$Props = CalendarPrimitive.Props;
type $$Events = CalendarPrimitive.Events; type $$Events = CalendarPrimitive.Events;
export let value: $$Props["value"] = undefined; export let value: $$Props['value'] = undefined;
export let placeholder: $$Props["placeholder"] = today(getLocalTimeZone()); export let placeholder: $$Props['placeholder'] = today(getLocalTimeZone());
export let weekdayFormat: $$Props["weekdayFormat"] = "short"; export let weekdayFormat: $$Props['weekdayFormat'] = 'short';
const monthOptions = [ const monthOptions = [
"January", 'January',
"February", 'February',
"March", 'March',
"April", 'April',
"May", 'May',
"June", 'June',
"July", 'July',
"August", 'August',
"September", 'September',
"October", 'October',
"November", 'November',
"December" 'December'
].map((month, i) => ({ value: i + 1, label: month })); ].map((month, i) => ({ value: i + 1, label: month }));
const monthFmt = new DateFormatter("en-US", { const monthFmt = new DateFormatter('en-US', {
month: "long" month: 'long'
}); });
const yearOptions = Array.from({ length: 100 }, (_, i) => ({ const yearOptions = Array.from({ length: 100 }, (_, i) => ({
@@ -54,13 +50,13 @@
} }
: undefined; : undefined;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>
<CalendarPrimitive.Root <CalendarPrimitive.Root
{weekdayFormat} {weekdayFormat}
{weekdayFormat} class={cn('rounded-md border p-3', className)}
{...$$restProps} {...$$restProps}
on:keydown on:keydown
let:months let:months

View File

@@ -1,16 +1,16 @@
import Root from "./calendar.svelte"; import Root from './calendar.svelte';
import Cell from "./calendar-cell.svelte"; import Cell from './calendar-cell.svelte';
import Day from "./calendar-day.svelte"; import Day from './calendar-day.svelte';
import Grid from "./calendar-grid.svelte"; import Grid from './calendar-grid.svelte';
import Header from "./calendar-header.svelte"; import Header from './calendar-header.svelte';
import Months from "./calendar-months.svelte"; import Months from './calendar-months.svelte';
import GridRow from "./calendar-grid-row.svelte"; import GridRow from './calendar-grid-row.svelte';
import Heading from "./calendar-heading.svelte"; import Heading from './calendar-heading.svelte';
import GridBody from "./calendar-grid-body.svelte"; import GridBody from './calendar-grid-body.svelte';
import GridHead from "./calendar-grid-head.svelte"; import GridHead from './calendar-grid-head.svelte';
import HeadCell from "./calendar-head-cell.svelte"; import HeadCell from './calendar-head-cell.svelte';
import NextButton from "./calendar-next-button.svelte"; import NextButton from './calendar-next-button.svelte';
import PrevButton from "./calendar-prev-button.svelte"; import PrevButton from './calendar-prev-button.svelte';
export { export {
Day, Day,
@@ -26,5 +26,5 @@ export {
NextButton, NextButton,
PrevButton, PrevButton,
// //
Root as Calendar, Root as Calendar
}; };

View File

@@ -14,7 +14,7 @@
<svelte:element <svelte:element
this={tag} this={tag}
class={cn('flex items-center gap-2 text-xl font-semibold leading-none tracking-tight', className)} class={cn('flex items-center gap-2 text-xl leading-none font-semibold tracking-tight', className)}
{...$$restProps} {...$$restProps}
> >
<slot /> <slot />

View File

@@ -14,7 +14,7 @@
<CheckboxPrimitive.Root <CheckboxPrimitive.Root
class={cn( class={cn(
'peer box-content h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[disabled=true]:cursor-not-allowed data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[disabled=true]:opacity-50', 'peer border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground box-content h-4 w-4 shrink-0 rounded-sm border focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',
className className
)} )}
bind:checked bind:checked

View File

@@ -1,19 +1,19 @@
<script lang="ts"> <script lang="ts">
import type { Dialog as DialogPrimitive } from "bits-ui"; import type { Dialog as DialogPrimitive } from 'bits-ui';
import type { Command as CommandPrimitive } from "cmdk-sv"; import type { Command as CommandPrimitive } from 'cmdk-sv';
import Command from "./command.svelte"; import Command from './command.svelte';
import * as Dialog from "$lib/components/ui/dialog/index.js"; import * as Dialog from '$lib/components/ui/dialog/index.js';
type $$Props = DialogPrimitive.Props & CommandPrimitive.CommandProps; type $$Props = DialogPrimitive.Props & CommandPrimitive.CommandProps;
export let open: $$Props["open"] = false; export let open: $$Props['open'] = false;
export let value: $$Props["value"] = undefined; export let value: $$Props['value'] = undefined;
</script> </script>
<Dialog.Root bind:open {...$$restProps}> <Dialog.Root bind:open {...$$restProps}>
<Dialog.Content class="overflow-hidden p-0 shadow-lg"> <Dialog.Content class="overflow-hidden p-0 shadow-lg">
<Command <Command
class="[&_[data-cmdk-group-heading]]:text-muted-foreground [&_[data-cmdk-group-heading]]:px-2 [&_[data-cmdk-group-heading]]:font-medium [&_[data-cmdk-group]:not([hidden])_~[data-cmdk-group]]:pt-0 [&_[data-cmdk-group]]:px-2 [&_[data-cmdk-input-wrapper]_svg]:h-5 [&_[data-cmdk-input-wrapper]_svg]:w-5 [&_[data-cmdk-input]]:h-12 [&_[data-cmdk-item]]:px-2 [&_[data-cmdk-item]]:py-3 [&_[data-cmdk-item]_svg]:h-5 [&_[data-cmdk-item]_svg]:w-5" class="[&_[data-cmdk-group-heading]]:text-muted-foreground [&_[data-cmdk-group-heading]]:px-2 [&_[data-cmdk-group-heading]]:font-medium [&_[data-cmdk-group]]:px-2 [&_[data-cmdk-group]:not([hidden])_~[data-cmdk-group]]:pt-0 [&_[data-cmdk-input-wrapper]_svg]:h-5 [&_[data-cmdk-input-wrapper]_svg]:w-5 [&_[data-cmdk-input]]:h-12 [&_[data-cmdk-item]]:px-2 [&_[data-cmdk-item]]:py-3 [&_[data-cmdk-item]_svg]:h-5 [&_[data-cmdk-item]_svg]:w-5"
{...$$restProps} {...$$restProps}
bind:value bind:value
> >

View File

@@ -1,13 +1,13 @@
<script lang="ts"> <script lang="ts">
import { Command as CommandPrimitive } from "cmdk-sv"; import { Command as CommandPrimitive } from 'cmdk-sv';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
import type { ClassValue } from "svelte/elements"; import type { ClassValue } from 'svelte/elements';
type $$Props = CommandPrimitive.EmptyProps; type $$Props = CommandPrimitive.EmptyProps;
let className: ClassValue | undefined | null = undefined; let className: ClassValue | undefined | null = undefined;
export { className as class }; export { className as class };
</script> </script>
<CommandPrimitive.Empty class={cn("py-6 text-center text-sm", className)} {...$$restProps}> <CommandPrimitive.Empty class={cn('py-6 text-center text-sm', className)} {...$$restProps}>
<slot /> <slot />
</CommandPrimitive.Empty> </CommandPrimitive.Empty>

View File

@@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { Command as CommandPrimitive } from "cmdk-sv"; import { Command as CommandPrimitive } from 'cmdk-sv';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
import type { ClassValue } from "svelte/elements"; import type { ClassValue } from 'svelte/elements';
type $$Props = CommandPrimitive.GroupProps; type $$Props = CommandPrimitive.GroupProps;
let className: ClassValue | undefined | null = undefined; let className: ClassValue | undefined | null = undefined;
@@ -10,7 +10,7 @@
<CommandPrimitive.Group <CommandPrimitive.Group
class={cn( class={cn(
"text-foreground [&_[data-cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[data-cmdk-group-heading]]:px-2 [&_[data-cmdk-group-heading]]:py-1.5 [&_[data-cmdk-group-heading]]:text-xs [&_[data-cmdk-group-heading]]:font-medium", 'text-foreground [&_[data-cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[data-cmdk-group-heading]]:px-2 [&_[data-cmdk-group-heading]]:py-1.5 [&_[data-cmdk-group-heading]]:text-xs [&_[data-cmdk-group-heading]]:font-medium',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { Command as CommandPrimitive } from "cmdk-sv"; import { Command as CommandPrimitive } from 'cmdk-sv';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
import type { ClassValue } from "svelte/elements"; import type { ClassValue } from 'svelte/elements';
type $$Props = CommandPrimitive.ItemProps; type $$Props = CommandPrimitive.ItemProps;
@@ -14,7 +14,7 @@
<CommandPrimitive.Item <CommandPrimitive.Item
{asChild} {asChild}
class={cn( class={cn(
"aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50", 'aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { Command as CommandPrimitive } from "cmdk-sv"; import { Command as CommandPrimitive } from 'cmdk-sv';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
import type { ClassValue } from "svelte/elements"; import type { ClassValue } from 'svelte/elements';
type $$Props = CommandPrimitive.ListProps; type $$Props = CommandPrimitive.ListProps;
let className: ClassValue | undefined | null = undefined; let className: ClassValue | undefined | null = undefined;
@@ -9,7 +9,7 @@
</script> </script>
<CommandPrimitive.List <CommandPrimitive.List
class={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)} class={cn('max-h-[300px] overflow-x-hidden overflow-y-auto', className)}
{...$$restProps} {...$$restProps}
> >
<slot /> <slot />

View File

@@ -1,11 +1,11 @@
<script lang="ts"> <script lang="ts">
import { Command as CommandPrimitive } from "cmdk-sv"; import { Command as CommandPrimitive } from 'cmdk-sv';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
import type { ClassValue } from "svelte/elements"; import type { ClassValue } from 'svelte/elements';
type $$Props = CommandPrimitive.SeparatorProps; type $$Props = CommandPrimitive.SeparatorProps;
let className: ClassValue | undefined | null = undefined; let className: ClassValue | undefined | null = undefined;
export { className as class }; export { className as class };
</script> </script>
<CommandPrimitive.Separator class={cn("bg-border -mx-1 h-px", className)} {...$$restProps} /> <CommandPrimitive.Separator class={cn('bg-border -mx-1 h-px', className)} {...$$restProps} />

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import type { ClassValue, HTMLAttributes } from "svelte/elements"; import type { ClassValue, HTMLAttributes } from 'svelte/elements';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = HTMLAttributes<HTMLSpanElement>; type $$Props = HTMLAttributes<HTMLSpanElement>;
@@ -9,7 +9,7 @@
</script> </script>
<span <span
class={cn("text-muted-foreground ml-auto text-xs tracking-widest", className)} class={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)}
{...$$restProps} {...$$restProps}
> >
<slot /> <slot />

View File

@@ -1,11 +1,11 @@
<script lang="ts"> <script lang="ts">
import { Command as CommandPrimitive } from "cmdk-sv"; import { Command as CommandPrimitive } from 'cmdk-sv';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
import type { ClassValue } from "svelte/elements"; import type { ClassValue } from 'svelte/elements';
type $$Props = CommandPrimitive.CommandProps; type $$Props = CommandPrimitive.CommandProps;
export let value: $$Props["value"] = undefined; export let value: $$Props['value'] = undefined;
let className: ClassValue | undefined | null = undefined; let className: ClassValue | undefined | null = undefined;
export { className as class }; export { className as class };
@@ -13,7 +13,7 @@
<CommandPrimitive.Root <CommandPrimitive.Root
class={cn( class={cn(
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',
className className
)} )}
bind:value bind:value

View File

@@ -1,14 +1,14 @@
import { Command as CommandPrimitive } from "cmdk-sv"; import { Command as CommandPrimitive } from 'cmdk-sv';
import Root from "./command.svelte"; import Root from './command.svelte';
import Dialog from "./command-dialog.svelte"; import Dialog from './command-dialog.svelte';
import Empty from "./command-empty.svelte"; import Empty from './command-empty.svelte';
import Group from "./command-group.svelte"; import Group from './command-group.svelte';
import Item from "./command-item.svelte"; import Item from './command-item.svelte';
import Input from "./command-input.svelte"; import Input from './command-input.svelte';
import List from "./command-list.svelte"; import List from './command-list.svelte';
import Separator from "./command-separator.svelte"; import Separator from './command-separator.svelte';
import Shortcut from "./command-shortcut.svelte"; import Shortcut from './command-shortcut.svelte';
const Loading = CommandPrimitive.Loading; const Loading = CommandPrimitive.Loading;
@@ -33,5 +33,5 @@ export {
List as CommandList, List as CommandList,
Separator as CommandSeparator, Separator as CommandSeparator,
Shortcut as CommandShortcut, Shortcut as CommandShortcut,
Loading as CommandLoading, Loading as CommandLoading
}; };

View File

@@ -6,7 +6,7 @@
type $$Props = DialogPrimitive.ContentProps & { type $$Props = DialogPrimitive.ContentProps & {
closeButton?: boolean; closeButton?: boolean;
} };
let className: $$Props['class'] = undefined; let className: $$Props['class'] = undefined;
export let transition: $$Props['transition'] = flyAndScale; export let transition: $$Props['transition'] = flyAndScale;
@@ -23,7 +23,7 @@
{transition} {transition}
{transitionConfig} {transitionConfig}
class={cn( class={cn(
'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:rounded-lg md:w-full', 'bg-background fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg sm:rounded-lg md:w-full',
className className
)} )}
{...$$restProps} {...$$restProps}
@@ -31,7 +31,7 @@
<slot /> <slot />
{#if closeButton} {#if closeButton}
<DialogPrimitive.Close <DialogPrimitive.Close
class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground" class="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none"
> >
<X class="h-4 w-4" /> <X class="h-4 w-4" />
<span class="sr-only">Close</span> <span class="sr-only">Close</span>

View File

@@ -9,7 +9,7 @@
</script> </script>
<DialogPrimitive.Description <DialogPrimitive.Description
class={cn('text-sm text-muted-foreground', className)} class={cn('text-muted-foreground text-sm', className)}
{...$$restProps} {...$$restProps}
> >
<slot /> <slot />

View File

@@ -16,6 +16,6 @@
<DialogPrimitive.Overlay <DialogPrimitive.Overlay
{transition} {transition}
{transitionConfig} {transitionConfig}
class={cn('fixed inset-0 z-50 bg-background/80 backdrop-blur-sm', className)} class={cn('bg-background/80 fixed inset-0 z-50 backdrop-blur-sm', className)}
{...$$restProps} {...$$restProps}
/> />

View File

@@ -9,7 +9,7 @@
</script> </script>
<DialogPrimitive.Title <DialogPrimitive.Title
class={cn('text-lg font-semibold leading-none tracking-tight', className)} class={cn('text-lg leading-none font-semibold tracking-tight', className)}
{...$$restProps} {...$$restProps}
> >
<slot /> <slot />

View File

@@ -14,7 +14,7 @@
<DropdownMenuPrimitive.CheckboxItem <DropdownMenuPrimitive.CheckboxItem
bind:checked bind:checked
class={cn( class={cn(
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50', 'data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -17,7 +17,7 @@
{transitionConfig} {transitionConfig}
{sideOffset} {sideOffset}
class={cn( class={cn(
'z-50 min-w-[8rem] rounded-md border bg-popover p-1 text-popover-foreground shadow-md focus:outline-none', 'bg-popover text-popover-foreground z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -14,7 +14,7 @@
<DropdownMenuPrimitive.Item <DropdownMenuPrimitive.Item
class={cn( class={cn(
'relative flex select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50', 'data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
inset && 'pl-8', inset && 'pl-8',
className className
)} )}

View File

@@ -13,7 +13,7 @@
<DropdownMenuPrimitive.RadioItem <DropdownMenuPrimitive.RadioItem
class={cn( class={cn(
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50', 'data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
className className
)} )}
{value} {value}

View File

@@ -9,6 +9,6 @@
</script> </script>
<DropdownMenuPrimitive.Separator <DropdownMenuPrimitive.Separator
class={cn('-mx-1 my-1 h-px bg-muted', className)} class={cn('bg-muted -mx-1 my-1 h-px', className)}
{...$$restProps} {...$$restProps}
/> />

View File

@@ -18,7 +18,7 @@
{transition} {transition}
{transitionConfig} {transitionConfig}
class={cn( class={cn(
'z-50 min-w-[8rem] rounded-md border bg-popover p-1 text-popover-foreground shadow-lg focus:outline-none', 'bg-popover text-popover-foreground z-50 min-w-[8rem] rounded-md border p-1 shadow-lg focus:outline-none',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -15,7 +15,7 @@
<DropdownMenuPrimitive.SubTrigger <DropdownMenuPrimitive.SubTrigger
class={cn( class={cn(
'flex select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:text-accent-foreground', 'data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none',
inset && 'pl-8', inset && 'pl-8',
className className
)} )}

View File

@@ -9,7 +9,7 @@
</script> </script>
<FormPrimitive.Description <FormPrimitive.Description
class={cn('text-sm text-muted-foreground', className)} class={cn('text-muted-foreground text-sm', className)}
{...$$restProps} {...$$restProps}
let:descriptionAttrs let:descriptionAttrs
> >

View File

@@ -12,7 +12,7 @@
</script> </script>
<FormPrimitive.FieldErrors <FormPrimitive.FieldErrors
class={cn('text-sm font-medium text-destructive', className)} class={cn('text-destructive text-sm font-medium', className)}
{...$$restProps} {...$$restProps}
let:errors let:errors
let:fieldErrorsAttrs let:fieldErrorsAttrs

View File

@@ -10,7 +10,7 @@
<FormPrimitive.Legend <FormPrimitive.Legend
{...$$restProps} {...$$restProps}
class={cn('text-sm font-medium leading-none data-[fs-error]:text-destructive', className)} class={cn('data-[fs-error]:text-destructive text-sm leading-none font-medium', className)}
let:legendAttrs let:legendAttrs
> >
<slot {legendAttrs} /> <slot {legendAttrs} />

View File

@@ -17,7 +17,7 @@
<input <input
class={cn( class={cn(
'flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50', 'border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',
className className
)} )}
bind:value bind:value

View File

@@ -11,7 +11,7 @@
<LabelPrimitive.Root <LabelPrimitive.Root
class={cn( class={cn(
'mb-3 block text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70', 'mb-3 block text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -13,7 +13,7 @@
{transition} {transition}
{transitionConfig} {transitionConfig}
class={cn( class={cn(
'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none', 'bg-popover text-popover-foreground z-50 w-72 rounded-md border p-4 shadow-md outline-none',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -27,7 +27,7 @@
{outTransitionConfig} {outTransitionConfig}
{sideOffset} {sideOffset}
class={cn( class={cn(
'relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md outline-none', 'bg-popover text-popover-foreground relative z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-md outline-none',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -18,7 +18,7 @@
{disabled} {disabled}
{label} {label}
class={cn( class={cn(
'relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50', 'data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex w-full items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -9,7 +9,7 @@
</script> </script>
<SelectPrimitive.Label <SelectPrimitive.Label
class={cn('py-1.5 pl-8 pr-2 text-sm font-semibold', className)} class={cn('py-1.5 pr-2 pl-8 text-sm font-semibold', className)}
{...$$restProps} {...$$restProps}
> >
<slot /> <slot />

View File

@@ -8,4 +8,4 @@
export { className as class }; export { className as class };
</script> </script>
<SelectPrimitive.Separator class={cn('-mx-1 my-1 h-px bg-muted', className)} {...$$restProps} /> <SelectPrimitive.Separator class={cn('bg-muted -mx-1 my-1 h-px', className)} {...$$restProps} />

View File

@@ -12,7 +12,7 @@
<SelectPrimitive.Trigger <SelectPrimitive.Trigger
class={cn( class={cn(
'flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 aria-[invalid]:border-destructive [&>span]:line-clamp-1 data-[placeholder]:[&>span]:text-muted-foreground', 'border-input bg-background ring-offset-background focus-visible:ring-ring aria-[invalid]:border-destructive data-[placeholder]:[&>span]:text-muted-foreground flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -12,7 +12,7 @@
<SeparatorPrimitive.Root <SeparatorPrimitive.Root
class={cn( class={cn(
'shrink-0 bg-border', 'bg-border shrink-0',
orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]', orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
className className
)} )}

View File

@@ -8,6 +8,6 @@
export { className as class }; export { className as class };
</script> </script>
<caption class={cn('mt-4 text-sm text-muted-foreground', className)} {...$$restProps}> <caption class={cn('text-muted-foreground mt-4 text-sm', className)} {...$$restProps}>
<slot /> <slot />
</caption> </caption>

View File

@@ -8,6 +8,6 @@
export { className as class }; export { className as class };
</script> </script>
<tfoot class={cn('bg-primary font-medium text-primary-foreground', className)} {...$$restProps}> <tfoot class={cn('bg-primary text-primary-foreground font-medium', className)} {...$$restProps}>
<slot /> <slot />
</tfoot> </tfoot>

View File

@@ -10,7 +10,7 @@
<th <th
class={cn( class={cn(
'h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0', 'text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -11,7 +11,7 @@
</script> </script>
<tr <tr
class={cn('border-b transition-colors data-[state=selected]:bg-muted', className)} class={cn('data-[state=selected]:bg-muted border-b transition-colors', className)}
{...$$restProps} {...$$restProps}
on:click on:click
on:keydown on:keydown

View File

@@ -1,7 +1,7 @@
import { Tabs as TabsPrimitive } from "bits-ui"; import { Tabs as TabsPrimitive } from 'bits-ui';
import Content from "./tabs-content.svelte"; import Content from './tabs-content.svelte';
import List from "./tabs-list.svelte"; import List from './tabs-list.svelte';
import Trigger from "./tabs-trigger.svelte"; import Trigger from './tabs-trigger.svelte';
const Root = TabsPrimitive.Root; const Root = TabsPrimitive.Root;
@@ -14,5 +14,5 @@ export {
Root as Tabs, Root as Tabs,
Content as TabsContent, Content as TabsContent,
List as TabsList, List as TabsList,
Trigger as TabsTrigger, Trigger as TabsTrigger
}; };

View File

@@ -1,17 +1,17 @@
<script lang="ts"> <script lang="ts">
import { Tabs as TabsPrimitive } from "bits-ui"; import { Tabs as TabsPrimitive } from 'bits-ui';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = TabsPrimitive.ContentProps; type $$Props = TabsPrimitive.ContentProps;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export let value: $$Props["value"]; export let value: $$Props['value'];
export { className as class }; export { className as class };
</script> </script>
<TabsPrimitive.Content <TabsPrimitive.Content
class={cn( class={cn(
"ring-offset-background focus-visible:ring-ring mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", 'ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none',
className className
)} )}
{value} {value}

View File

@@ -1,16 +1,16 @@
<script lang="ts"> <script lang="ts">
import { Tabs as TabsPrimitive } from "bits-ui"; import { Tabs as TabsPrimitive } from 'bits-ui';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = TabsPrimitive.ListProps; type $$Props = TabsPrimitive.ListProps;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>
<TabsPrimitive.List <TabsPrimitive.List
class={cn( class={cn(
"bg-muted text-muted-foreground inline-flex h-10 items-center justify-center rounded-md p-1", 'bg-muted text-muted-foreground inline-flex h-10 items-center justify-center rounded-md p-1',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -1,18 +1,18 @@
<script lang="ts"> <script lang="ts">
import { Tabs as TabsPrimitive } from "bits-ui"; import { Tabs as TabsPrimitive } from 'bits-ui';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
type $$Props = TabsPrimitive.TriggerProps; type $$Props = TabsPrimitive.TriggerProps;
type $$Events = TabsPrimitive.TriggerEvents; type $$Events = TabsPrimitive.TriggerEvents;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export let value: $$Props["value"]; export let value: $$Props['value'];
export { className as class }; export { className as class };
</script> </script>
<TabsPrimitive.Trigger <TabsPrimitive.Trigger
class={cn( class={cn(
"ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm", 'ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm',
className className
)} )}
{value} {value}

View File

@@ -19,7 +19,7 @@
{transitionConfig} {transitionConfig}
{sideOffset} {sideOffset}
class={cn( class={cn(
'z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md', 'bg-popover text-popover-foreground z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md',
className className
)} )}
{...$$restProps} {...$$restProps}

View File

@@ -9,7 +9,6 @@ import type {
import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type'; import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';
import APIService from './api-service'; import APIService from './api-service';
class OidcService extends APIService { class OidcService extends APIService {
async authorize( async authorize(
clientId: string, clientId: string,

View File

@@ -12,7 +12,7 @@ export type AuditLog = {
}; };
export type AuditLogFilter = { export type AuditLogFilter = {
userId: string, userId: string;
event: string, event: string;
clientName: string, clientName: string;
} };

View File

@@ -84,18 +84,21 @@
{#if client == null} {#if client == null}
<p>{m.client_not_found()}</p> <p>{m.client_not_found()}</p>
{:else} {:else}
<SignInWrapper animate={!$appConfigStore.disableAnimations} showAlternativeSignInMethodButton={$userStore == null}> <SignInWrapper
animate={!$appConfigStore.disableAnimations}
showAlternativeSignInMethodButton={$userStore == null}
>
<ClientProviderImages {client} {success} error={!!errorMessage} /> <ClientProviderImages {client} {success} error={!!errorMessage} />
<h1 class="font-playfair mt-5 text-3xl font-bold sm:text-4xl"> <h1 class="font-playfair mt-5 text-3xl font-bold sm:text-4xl">
{m.sign_in_to({ name: client.name })} {m.sign_in_to({ name: client.name })}
</h1> </h1>
{#if errorMessage} {#if errorMessage}
<p class="text-muted-foreground mb-10 mt-2"> <p class="text-muted-foreground mt-2 mb-10">
{errorMessage}. {errorMessage}.
</p> </p>
{/if} {/if}
{#if !authorizationRequired && !errorMessage} {#if !authorizationRequired && !errorMessage}
<p class="text-muted-foreground mb-10 mt-2"> <p class="text-muted-foreground mt-2 mb-10">
{@html m.do_you_want_to_sign_in_to_client_with_your_app_name_account({ {@html m.do_you_want_to_sign_in_to_client_with_your_app_name_account({
client: client.name, client: client.name,
appName: $appConfigStore.appName appName: $appConfigStore.appName
@@ -103,7 +106,7 @@
</p> </p>
{:else if authorizationRequired} {:else if authorizationRequired}
<div transition:slide={{ duration: 300 }}> <div transition:slide={{ duration: 300 }}>
<Card.Root class="mb-10 mt-6"> <Card.Root class="mt-6 mb-10">
<Card.Header class="pb-5"> <Card.Header class="pb-5">
<p class="text-muted-foreground text-start"> <p class="text-muted-foreground text-start">
{@html m.client_wants_to_access_the_following_information({ client: client.name })} {@html m.client_wants_to_access_the_following_information({ client: client.name })}

View File

@@ -2,17 +2,15 @@ import type { RequestHandler } from '@sveltejs/kit';
import axios from 'axios'; import axios from 'axios';
export const GET: RequestHandler = async () => { export const GET: RequestHandler = async () => {
const backendOK = await axios const backendOK = await axios.get(process!.env!.INTERNAL_BACKEND_URL + '/healthz').then(
.get(process!.env!.INTERNAL_BACKEND_URL + '/healthz') () => true,
.then(() => true, () => false); () => false
);
return new Response( return new Response(backendOK ? `{"status":"HEALTHY"}` : `{"status":"UNHEALTHY"}`, {
backendOK ? `{"status":"HEALTHY"}` : `{"status":"UNHEALTHY"}`,
{
status: backendOK ? 200 : 500, status: backendOK ? 200 : 500,
headers: { headers: {
'content-type': 'application/json' 'content-type': 'application/json'
} }
} });
);
}; };

View File

@@ -8,4 +8,4 @@ export const load: PageLoad = async ({ url }) => {
targetPath += `?redirect=${encodeURIComponent(url.searchParams.get('redirect')!)}`; targetPath += `?redirect=${encodeURIComponent(url.searchParams.get('redirect')!)}`;
} }
return redirect(307, targetPath); return redirect(307, targetPath);
} };

View File

@@ -13,4 +13,4 @@ export const load: PageLoad = async ({ url, params }) => {
} }
return redirect(307, `${targetPath}?${searchParams.toString()}`); return redirect(307, `${targetPath}?${searchParams.toString()}`);
} };

View File

@@ -68,7 +68,9 @@
> >
<Input id="Email" class="mt-7" placeholder={m.code()} bind:value={code} type="text" /> <Input id="Email" class="mt-7" placeholder={m.code()} bind:value={code} type="text" />
<div class="mt-8 flex justify-stretch gap-2"> <div class="mt-8 flex justify-stretch gap-2">
<Button variant="secondary" class="w-full" href={"/login/alternative" + page.url.search}>{m.go_back()}</Button> <Button variant="secondary" class="w-full" href={'/login/alternative' + page.url.search}
>{m.go_back()}</Button
>
<Button class="w-full" type="submit" {isLoading}>{m.submit()}</Button> <Button class="w-full" type="submit" {isLoading}>{m.submit()}</Button>
</div> </div>
</form> </form>

View File

@@ -53,7 +53,9 @@
<Button variant="secondary" class="w-full" href={'/login/alternative' + page.url.search} <Button variant="secondary" class="w-full" href={'/login/alternative' + page.url.search}
>{m.go_back()}</Button >{m.go_back()}</Button
> >
<Button class="w-full" href={'/login/alternative/code' + page.url.search}>{m.enter_code()}</Button> <Button class="w-full" href={'/login/alternative/code' + page.url.search}
>{m.enter_code()}</Button
>
</div> </div>
{:else} {:else}
<form <form

View File

@@ -3,4 +3,4 @@ import type { PageLoad } from './$types';
export const load: PageLoad = async () => { export const load: PageLoad = async () => {
throw redirect(307, '/settings/account'); throw redirect(307, '/settings/account');
} };

View File

@@ -93,7 +93,6 @@
</Alert.Root> </Alert.Root>
{/if} {/if}
<!-- Login code card mobile --> <!-- Login code card mobile -->
<div class="block sm:hidden"> <div class="block sm:hidden">
<Card.Root> <Card.Root>
@@ -167,7 +166,6 @@
</Card.Root> </Card.Root>
</div> </div>
<!-- Login code card --> <!-- Login code card -->
<div class="hidden sm:block"> <div class="hidden sm:block">
<Card.Root> <Card.Root>

View File

@@ -56,7 +56,7 @@
</CopyToClipboard> </CopyToClipboard>
<div class="text-muted-foreground my-2 flex items-center justify-center gap-3"> <div class="text-muted-foreground my-2 flex items-center justify-center gap-3">
<Separator /> <Separator />
<p class="text-nowrap text-xs">{m.or_visit()}</p> <p class="text-xs text-nowrap">{m.or_visit()}</p>
<Separator /> <Separator />
</div> </div>

View File

@@ -32,14 +32,14 @@
<p class="text-muted-foreground">{apiKeyResponse.apiKey.name}</p> <p class="text-muted-foreground">{apiKeyResponse.apiKey.name}</p>
{#if apiKeyResponse.apiKey.description} {#if apiKeyResponse.apiKey.description}
<div class="mb-2 mt-4 font-medium">{m.description()}</div> <div class="mt-4 mb-2 font-medium">{m.description()}</div>
<p class="text-muted-foreground">{apiKeyResponse.apiKey.description}</p> <p class="text-muted-foreground">{apiKeyResponse.apiKey.description}</p>
{/if} {/if}
<div class="mb-2 mt-4 font-medium">{m.api_key()}</div> <div class="mt-4 mb-2 font-medium">{m.api_key()}</div>
<div class="bg-muted rounded-md p-2"> <div class="bg-muted rounded-md p-2">
<CopyToClipboard value={apiKeyResponse.token}> <CopyToClipboard value={apiKeyResponse.token}>
<span class="break-all font-mono text-sm">{apiKeyResponse.token}</span> <span class="font-mono text-sm break-all">{apiKeyResponse.token}</span>
</CopyToClipboard> </CopyToClipboard>
</div> </div>
</div> </div>

View File

@@ -29,7 +29,9 @@
function revokeApiKey(apiKey: ApiKey) { function revokeApiKey(apiKey: ApiKey) {
openConfirmDialog({ openConfirmDialog({
title: m.revoke_api_key(), title: m.revoke_api_key(),
message: m.are_you_sure_you_want_to_revoke_the_api_key_apikeyname({ apiKeyName: apiKey.name }), message: m.are_you_sure_you_want_to_revoke_the_api_key_apikeyname({
apiKeyName: apiKey.name
}),
confirm: { confirm: {
label: m.revoke(), label: m.revoke(),
destructive: true, destructive: true,
@@ -66,8 +68,11 @@
<Table.Cell>{formatDate(item.expiresAt)}</Table.Cell> <Table.Cell>{formatDate(item.expiresAt)}</Table.Cell>
<Table.Cell>{formatDate(item.lastUsedAt)}</Table.Cell> <Table.Cell>{formatDate(item.lastUsedAt)}</Table.Cell>
<Table.Cell class="flex justify-end"> <Table.Cell class="flex justify-end">
<Button on:click={() => revokeApiKey(item)} size="sm" variant="outline" aria-label={m.revoke()} <Button
><LucideBan class="h-3 w-3 text-red-500" /></Button on:click={() => revokeApiKey(item)}
size="sm"
variant="outline"
aria-label={m.revoke()}><LucideBan class="h-3 w-3 text-red-500" /></Button
> >
</Table.Cell> </Table.Cell>
{/snippet} {/snippet}

View File

@@ -59,7 +59,7 @@
alt={label} alt={label}
/> />
<span <span
class="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform font-medium opacity-0 transition-opacity group-hover:opacity-100" class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 transform font-medium opacity-0 transition-opacity group-hover:opacity-100"
> >
{m.update()} {m.update()}
</span> </span>

View File

@@ -63,8 +63,7 @@
async function createClientSecret() { async function createClientSecret() {
openConfirmDialog({ openConfirmDialog({
title: m.create_new_client_secret(), title: m.create_new_client_secret(),
message: message: m.are_you_sure_you_want_to_create_a_new_client_secret(),
m.are_you_sure_you_want_to_create_a_new_client_secret(),
confirm: { confirm: {
label: m.generate(), label: m.generate(),
destructive: true, destructive: true,
@@ -119,7 +118,7 @@
</CopyToClipboard> </CopyToClipboard>
</div> </div>
{#if !client.isPublic} {#if !client.isPublic}
<div class="mb-2 mt-1 flex flex-col sm:flex-row sm:items-center"> <div class="mt-1 mb-2 flex flex-col sm:flex-row sm:items-center">
<Label class="mb-0 w-44">{m.client_secret()}</Label> <Label class="mb-0 w-44">{m.client_secret()}</Label>
{#if $clientSecretStore} {#if $clientSecretStore}
<CopyToClipboard value={$clientSecretStore}> <CopyToClipboard value={$clientSecretStore}>

View File

@@ -21,9 +21,7 @@
<Dialog.Content class="max-w-md"> <Dialog.Content class="max-w-md">
<Dialog.Header> <Dialog.Header>
<Dialog.Title>{m.one_time_link()}</Dialog.Title> <Dialog.Title>{m.one_time_link()}</Dialog.Title>
<Dialog.Description <Dialog.Description>{m.use_this_link_to_sign_in_once()}</Dialog.Description>
>{m.use_this_link_to_sign_in_once()}</Dialog.Description
>
</Dialog.Header> </Dialog.Header>
<Label for="one-time-link">{m.one_time_link()}</Label> <Label for="one-time-link">{m.one_time_link()}</Label>
<Input id="one-time-link" value={oneTimeLink} readonly /> <Input id="one-time-link" value={oneTimeLink} readonly />

View File

@@ -10,7 +10,7 @@ export const load: PageServerLoad = async ({ cookies }) => {
sort: { sort: {
column: 'friendlyName', column: 'friendlyName',
direction: 'asc' direction: 'asc'
}, }
}; };
const userGroups = await userGroupService.list(userGroupsRequestOptions); const userGroups = await userGroupService.list(userGroupsRequestOptions);

View File

@@ -64,7 +64,8 @@
<Table.Cell>{item.userCount}</Table.Cell> <Table.Cell>{item.userCount}</Table.Cell>
{#if $appConfigStore.ldapEnabled} {#if $appConfigStore.ldapEnabled}
<Table.Cell> <Table.Cell>
<Badge variant={item.ldapId ? 'default' : 'outline'}>{item.ldapId ? m.ldap() : m.local()}</Badge <Badge variant={item.ldapId ? 'default' : 'outline'}
>{item.ldapId ? m.ldap() : m.local()}</Badge
> >
</Table.Cell> </Table.Cell>
{/if} {/if}

View File

@@ -34,7 +34,10 @@
async function deleteUser(user: User) { async function deleteUser(user: User) {
openConfirmDialog({ openConfirmDialog({
title: m.delete_firstname_lastname({ firstName: user.firstName, lastName: user.lastName ?? "" }), title: m.delete_firstname_lastname({
firstName: user.firstName,
lastName: user.lastName ?? ''
}),
message: m.are_you_sure_you_want_to_delete_this_user(), message: m.are_you_sure_you_want_to_delete_this_user(),
confirm: { confirm: {
label: m.delete(), label: m.delete(),
@@ -67,7 +70,10 @@
async function disableUser(user: User) { async function disableUser(user: User) {
openConfirmDialog({ openConfirmDialog({
title: m.disable_firstname_lastname({ firstName: user.firstName, lastName: user.lastName ?? "" }), title: m.disable_firstname_lastname({
firstName: user.firstName,
lastName: user.lastName ?? ''
}),
message: m.are_you_sure_you_want_to_disable_this_user(), message: m.are_you_sure_you_want_to_disable_this_user(),
confirm: { confirm: {
label: m.disable(), label: m.disable(),

View File

@@ -6,7 +6,7 @@
let { currentPage }: { currentPage: 'personal' | 'global' } = $props(); let { currentPage }: { currentPage: 'personal' | 'global' } = $props();
</script> </script>
<div class="flex justify-end no-fade"> <div class="no-fade flex justify-end">
<Tabs.Root value={currentPage}> <Tabs.Root value={currentPage}>
<Tabs.List> <Tabs.List>
<Tabs.Trigger onclick={() => goto('/settings/audit-log')} value="personal" <Tabs.Trigger onclick={() => goto('/settings/audit-log')} value="personal"

View File

@@ -1,6 +1,6 @@
import adapter from '@sveltejs/adapter-node'; import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import packageJson from './package.json' with { type: "json" }; import packageJson from './package.json' with { type: 'json' };
/** @type {import('@sveltejs/kit').Config} */ /** @type {import('@sveltejs/kit').Config} */
const config = { const config = {

View File

@@ -33,7 +33,7 @@ export const oidcClients = {
id: '606c7782-f2b1-49e5-8ea9-26eb1b06d018', id: '606c7782-f2b1-49e5-8ea9-26eb1b06d018',
name: 'Immich', name: 'Immich',
callbackUrl: 'http://immich/auth/callback', callbackUrl: 'http://immich/auth/callback',
secret: 'PYjrE9u4v9GVqXKi52eur0eb2Ci4kc0x', secret: 'PYjrE9u4v9GVqXKi52eur0eb2Ci4kc0x'
}, },
pingvinShare: { pingvinShare: {
name: 'Pingvin Share', name: 'Pingvin Share',

View File

@@ -10,8 +10,8 @@ export default defineConfig({
paraglideVitePlugin({ paraglideVitePlugin({
project: './project.inlang', project: './project.inlang',
outdir: './src/lib/paraglide', outdir: './src/lib/paraglide',
cookieName: "locale", cookieName: 'locale',
strategy: ['cookie', 'preferredLanguage', 'baseLocale'] strategy: ['cookie', 'preferredLanguage', 'baseLocale']
}), })
] ]
}); });