diff --git a/package.json b/package.json index 14b94104..e843c6e9 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "@sveltejs/adapter-auto": "^3.3.1", "@sveltejs/adapter-node": "^5.2.9", "@sveltejs/adapter-vercel": "^5.4.6", - "@sveltejs/kit": "^2.7.3", + "@sveltejs/kit": "^2.15.0", "@sveltejs/vite-plugin-svelte": "^3.1.2", "@tailwindcss/container-queries": "^0.1.1", "@tanstack/svelte-virtual": "^3.8.1", @@ -26,7 +26,7 @@ "prettier": "^3.3.3", "prettier-plugin-svelte": "^3.2.7", "rollup-plugin-visualizer": "^5.9.2", - "svelte": "^5.1.3", + "svelte": "^5.15.0", "svelte-check": "^4.0.0", "svelte-floating-ui": "^1.5.9", "svelte-focus-trap": "^1.2.0", diff --git a/src/lib/components/ui/navbar/commands/CommandItem.svelte b/src/lib/components/ui/navbar/commands/CommandItem.svelte index 540e5002..933ae75e 100644 --- a/src/lib/components/ui/navbar/commands/CommandItem.svelte +++ b/src/lib/components/ui/navbar/commands/CommandItem.svelte @@ -8,14 +8,17 @@ } from 'svelte-hero-icons' import Avatar from '../../Avatar.svelte' import type { Action } from './actions.svelte' + import type { HTMLButtonAttributes } from 'svelte/elements' interface Props { action: Action class?: string children?: import('svelte').Snippet + onclick?: HTMLButtonAttributes['onclick'] + [key: string]: any } - let { action, class: clazz = '', children }: Props = $props() + let { action, class: clazz = '', children, ...rest }: Props = $props() + {$t('routes.communities.title')} +
- import { run, preventDefault } from 'svelte/legacy' - import { goto } from '$app/navigation' import { page } from '$app/stores' import Header from '$lib/components/ui/layout/pages/Header.svelte' @@ -14,11 +12,9 @@ // @ts-ignore let totpLink: string | undefined = $state(undefined) - let totpEnabled - run(() => { - totpEnabled = - data.my_user?.local_user_view.local_user.totp_2fa_enabled ?? totpLink - }) + let totpEnabled = $state( + data.my_user?.local_user_view.local_user.totp_2fa_enabled, + ) let verify_totp = $state('') @@ -83,7 +79,7 @@ {/if}
{})} + onsubmit={(e) => e.preventDefault()} >