Replace deprecated $app/stores with $app/state in SvelteKit frontend (#4282)

* Migrate frontend from /stores to /state

* Update CONTRIBUTORS
This commit is contained in:
Lee Doughty 2025-08-26 19:28:49 +01:00 committed by GitHub
parent 3d0a408a2b
commit 2fee6f959b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 7 deletions

View file

@ -238,6 +238,7 @@ Bradley Szoke <bradleyszoke@gmail.com>
jcznk <https://github.com/jcznk>
Thomas Rixen <thomas.rixen@student.uclouvain.be>
Siyuan Mattuwu Yan <syan4@ualberta.ca>
Lee Doughty <https://github.com/leedoughty>
********************

View file

@ -3,9 +3,9 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import { page } from "$app/stores";
import { page } from "$app/state";
$: message = $page.error!.message;
$: message = page.error!.message;
</script>
{message}

View file

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import { page } from "$app/stores";
import { page } from "$app/state";
import CardInfo from "../CardInfo.svelte";
import type { PageData } from "./$types";
@ -11,7 +11,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export let data: PageData;
const showRevlog = $page.url.searchParams.get("revlog") !== "0";
const showRevlog = page.url.searchParams.get("revlog") !== "0";
globalThis.anki ||= {};
globalThis.anki.updateCard = async (card_id: string): Promise<void> => {

View file

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import { page } from "$app/stores";
import { page } from "$app/state";
import CardInfo from "../../CardInfo.svelte";
import type { PageData } from "./$types";
@ -11,8 +11,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export let data: PageData;
const showRevlog = $page.url.searchParams.get("revlog") !== "0";
const showCurve = $page.url.searchParams.get("curve") !== "0";
const showRevlog = page.url.searchParams.get("revlog") !== "0";
const showCurve = page.url.searchParams.get("curve") !== "0";
globalThis.anki ||= {};
globalThis.anki.updateCardInfos = async (card_id: string): Promise<void> => {