Added: Flag showing

This commit is contained in:
Luc Mcgrady 2025-11-10 17:04:58 +00:00
parent ef4500c7ef
commit 028b285849
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C
2 changed files with 9 additions and 0 deletions

View file

@ -3,6 +3,8 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script>
import "./index.scss";
import { onMount } from "svelte";
import { ReviewerState, updateNightMode } from "./reviewer";
import ReviewerBottom from "./reviewer-bottom/ReviewerBottom.svelte";
@ -16,6 +18,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
globalThis.anki.changeReceived = () => state.showQuestion(null);
_blockDefaultDragDropBehavior();
});
$: cardData = state.cardData;
$: flag = $cardData?.queue?.cards[0].card?.flags;
</script>
<div>
@ -23,6 +27,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<ReviewerBottom {state}></ReviewerBottom>
</div>
{#if flag}
<div id="_flag" style:color={`var(--flag-${flag})`}>⚑</div>
{/if}
<style>
div {
height: 100vh;

View file

@ -0,0 +1 @@
@use "../../reviewer/reviewer.scss"