This commit is contained in:
Luc Mcgrady 2025-09-04 00:26:10 +01:00
parent c7fd7a0965
commit 1e67a773c6
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C
5 changed files with 20 additions and 20 deletions

View file

@ -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>

View file

@ -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() {
/*

View file

@ -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>

View file

@ -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 };
}

View file

@ -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>