Update to svelte 5

This commit is contained in:
2025-10-13 16:05:50 +02:00
parent f936e4c0f2
commit 6d89c5ddd9
129 changed files with 2443 additions and 2180 deletions

View File

@@ -2,13 +2,16 @@
import { onMount } from "svelte";
import Modal from "util/Modal.svelte";
import { get_user, put_user } from "lib/PixeldrainAPI";
import { loading_finish, loading_start } from "lib/Loading";
import { loading_finish, loading_start } from "lib/Loading";
// When the always flag is set then the pop-up will also show if the user
// already has an affiliate ID set
export let always = false
let modal: Modal
let referral: string
let { always = false }: {
// When the always flag is set then the pop-up will also show if the user
// already has an affiliate ID set
always?: boolean;
} = $props();
let modal: Modal = $state()
let referral: string = $state()
let shown = false
export const prompt = async (ref: string) => {
@@ -105,10 +108,10 @@ const deny = () => {
choose 'Deny' then we will never show this pop-up again.
</p>
<div class="buttons">
<button class="button button_red" on:click={e => deny()}>
<button class="button button_red" onclick={e => deny()}>
Deny
</button>
<button class="button button_highlight" on:click={e => allow()}>
<button class="button button_highlight" onclick={e => allow()}>
Accept
</button>
</div>