Updated to Svelte 5
This commit is contained in:
@@ -5,7 +5,10 @@ SPDX-License-Identifier: MPL-2.0
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { alertModal, navbarVisible } from '$lib/stores';
|
||||
import { run } from 'svelte/legacy';
|
||||
|
||||
import { alertModal } from '$lib/stores';
|
||||
import { navbarVisible } from '$lib/stores.svelte';
|
||||
import { slide } from 'svelte/transition';
|
||||
import Footer from '$lib/footer.svelte';
|
||||
import VerifiedBadge from './verified_badge.svelte';
|
||||
@@ -17,15 +20,15 @@ SPDX-License-Identifier: MPL-2.0
|
||||
import TotpComponent from './totp_component.svelte';
|
||||
import { browserSupportsWebAuthn } from '@simplewebauthn/browser';
|
||||
|
||||
navbarVisible.set(true);
|
||||
navbarVisible.visible = true;
|
||||
|
||||
export let data;
|
||||
let { data } = $props();
|
||||
const { verified }: boolean = data;
|
||||
|
||||
let session_data = {};
|
||||
let step = 0;
|
||||
let selected_method = null;
|
||||
let done = false;
|
||||
let session_data = $state({});
|
||||
let step = $state(0);
|
||||
let selected_method = $state(null);
|
||||
let done = $state(false);
|
||||
|
||||
const redirect_back = (done_var: boolean) => {
|
||||
if (done_var) {
|
||||
@@ -35,7 +38,9 @@ SPDX-License-Identifier: MPL-2.0
|
||||
}
|
||||
};
|
||||
let alertModalOpen = false;
|
||||
$: redirect_back(done);
|
||||
run(() => {
|
||||
redirect_back(done);
|
||||
});
|
||||
|
||||
alertModal.subscribe((data) => {
|
||||
if (!alertModalOpen && data.open) {
|
||||
@@ -74,10 +79,10 @@ SPDX-License-Identifier: MPL-2.0
|
||||
}
|
||||
}
|
||||
};
|
||||
$: {
|
||||
run(() => {
|
||||
check_auto();
|
||||
step;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
||||
Reference in New Issue
Block a user