mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
./check
This commit is contained in:
parent
c7fd7a0965
commit
1e67a773c6
5 changed files with 20 additions and 20 deletions
|
@ -11,7 +11,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
let reviewerInfo: null | ReturnType<typeof setupBottomBar> = null;
|
||||
|
||||
onMount(() => {
|
||||
reviewerInfo = setupBottomBar()
|
||||
reviewerInfo = setupBottomBar();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { bridgeCommand } from "@tslib/bridgecommand";
|
||||
import { writable } from "svelte/store";
|
||||
import type { AnswerButtonInfo } from "./types";
|
||||
import { bridgeCommand } from "@tslib/bridgecommand";
|
||||
|
||||
export function setupBottomBar() {
|
||||
/*
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts">
|
||||
import type { Writable } from "svelte/store";
|
||||
|
||||
export let html: Writable<string>
|
||||
export let cardClass: Writable<string>
|
||||
export let html: Writable<string>;
|
||||
export let cardClass: Writable<string>;
|
||||
</script>
|
||||
|
||||
<div id="qa" class={$cardClass}>
|
||||
|
@ -11,6 +11,6 @@
|
|||
|
||||
<style lang="scss">
|
||||
#qa {
|
||||
flex: 1
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
import { writable } from "svelte/store"
|
||||
import { preloadAnswerImages } from "../../reviewer/images"
|
||||
import { writable } from "svelte/store";
|
||||
import { preloadAnswerImages } from "../../reviewer/images";
|
||||
|
||||
export function setupReviewer() {
|
||||
const html = writable("")
|
||||
const cardClass = writable("")
|
||||
const html = writable("");
|
||||
const cardClass = writable("");
|
||||
|
||||
function showQuestion(q, a, cc) {
|
||||
html.set(q)
|
||||
cardClass.set(cc)
|
||||
preloadAnswerImages(a)
|
||||
html.set(q);
|
||||
cardClass.set(cc);
|
||||
preloadAnswerImages(a);
|
||||
}
|
||||
|
||||
globalThis._showAnswer = html.set
|
||||
globalThis._showQuestion = showQuestion
|
||||
globalThis._showAnswer = html.set;
|
||||
globalThis._showQuestion = showQuestion;
|
||||
|
||||
return {html, cardClass}
|
||||
return { html, cardClass };
|
||||
}
|
|
@ -7,12 +7,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
import { setupReviewer } from "./reviewer";
|
||||
import Reviewer from "./reviewer.svelte";
|
||||
|
||||
import "../../reviewer/reviewer.scss"
|
||||
import "../../reviewer/reviewer.scss";
|
||||
|
||||
let reviewerInfo: null | ReturnType<typeof setupReviewer> = null;
|
||||
|
||||
onMount(() => {
|
||||
reviewerInfo = setupReviewer()
|
||||
reviewerInfo = setupReviewer();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in a new issue