mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 15:47:12 -05:00
* Restore $deckOptions * Avoid error in logs when using ./yarn dev or mobile clients (dae)
24 lines
745 B
Svelte
24 lines
745 B
Svelte
<!--
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
-->
|
|
<script lang="ts">
|
|
import { onMount } from "svelte";
|
|
import DeckOptionsPage from "../DeckOptionsPage.svelte";
|
|
import type { PageData } from "./$types";
|
|
import { bridgeCommand, bridgeCommandsAvailable } from "@tslib/bridgecommand";
|
|
|
|
export let data: PageData;
|
|
let page: DeckOptionsPage;
|
|
|
|
onMount(() => {
|
|
globalThis.$deckOptions = new Promise((resolve, _reject) => {
|
|
resolve(page);
|
|
});
|
|
if (bridgeCommandsAvailable()) {
|
|
bridgeCommand("deckOptionsReady");
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<DeckOptionsPage state={data.state} bind:this={page} />
|