diff --git a/src/components/LoginDialog.svelte b/src/components/LoginDialog.svelte index 2eae626..ca8aee1 100644 --- a/src/components/LoginDialog.svelte +++ b/src/components/LoginDialog.svelte @@ -2,7 +2,7 @@ import { submitLogin } from '../skythread.js'; import { APIError } from '../api.js'; - let { onClose = undefined }: { onClose?: () => void } = $props(); + let { onClose = undefined }: { onClose?: (() => void) | undefined } = $props(); let identifier: string = $state(''); let password: string = $state(''); @@ -16,6 +16,11 @@ loginInfoVisible = !loginInfoVisible; } + function onCloseClick(e: Event) { + e.preventDefault(); + onClose?.(); + } + async function onsubmit(e: Event) { e.preventDefault(); submitting = true; @@ -44,7 +49,7 @@