Updated to Svelte 5

This commit is contained in:
Mawoka
2025-09-21 12:42:04 +02:00
parent fa533257b3
commit a88cf13f82
137 changed files with 2279 additions and 1948 deletions
+15 -10
View File
@@ -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>