diff --git a/drizzle/schema.ts b/drizzle/schema.ts index ff9970f..376fdf9 100644 --- a/drizzle/schema.ts +++ b/drizzle/schema.ts @@ -8,7 +8,6 @@ import { unique, primaryKey } from 'drizzle-orm/pg-core'; -import { sql } from 'drizzle-orm'; export const items = pgTable( 'items', diff --git a/eslint.config.js b/eslint.config.js index b715a68..db9c541 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -14,6 +14,11 @@ export default [ ...globals.browser, ...globals.node } + }, + rules: { + // Disable overly strict Svelte navigation rules + 'svelte/no-navigation-without-resolve': 'off', + 'svelte/no-navigation-without-base': 'off' } }, { @@ -25,6 +30,6 @@ export default [ } }, { - ignores: ['build/', '.svelte-kit/', 'dist/'] + ignores: ['build/', '.svelte-kit/', 'dist/', '**/*.svelte.ts'] } ]; diff --git a/src/auth.ts b/src/auth.ts index 83a86a7..898281b 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -10,11 +10,19 @@ import bcrypt from 'bcrypt'; import { env } from '$env/dynamic/private'; import type { SvelteKitAuthConfig } from '@auth/sveltekit'; +interface AuthentikProfile { + sub: string; + email: string; + name?: string; + preferred_username?: string; + picture?: string; +} + function Authentik(config: { clientId: string; clientSecret: string; issuer: string; -}): OAuthConfig { +}): OAuthConfig { return { id: 'authentik', name: 'Authentik', diff --git a/src/lib/components/dashboard/LocalWishlistsSection.svelte b/src/lib/components/dashboard/LocalWishlistsSection.svelte index 19d496d..bdb5fb0 100644 --- a/src/lib/components/dashboard/LocalWishlistsSection.svelte +++ b/src/lib/components/dashboard/LocalWishlistsSection.svelte @@ -24,7 +24,7 @@ const t = $derived(languageStore.t); let localWishlists = $state([]); - let enrichedWishlists = $state([]); + let enrichedWishlists = $state>>([]); onMount(async () => { localWishlists = getLocalWishlists(); @@ -129,14 +129,14 @@ {fallbackColor} {fallbackTheme} > - {#snippet actions(wishlist, unlocked)} + {#snippet actions(wishlist: Record, unlocked: boolean)}
- @@ -145,14 +145,14 @@ variant="outline" onclick={() => { navigator.clipboard.writeText( - `${window.location.origin}/wishlist/${wishlist.publicToken}` + `${window.location.origin}/wishlist/${wishlist.publicToken as string}` ); }} > {t.dashboard.copyLink} {#if unlocked} - {/if} diff --git a/src/lib/components/dashboard/WishlistCard.svelte b/src/lib/components/dashboard/WishlistCard.svelte index 67ec3e2..64560e8 100644 --- a/src/lib/components/dashboard/WishlistCard.svelte +++ b/src/lib/components/dashboard/WishlistCard.svelte @@ -1,5 +1,4 @@