From c70e9d26c53b3f4ce58a0f3e3b53ea58c0381aac Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 5 May 2025 17:03:57 +1000 Subject: [PATCH] Add the ability to hide the forgetting curve from card info --- ts/routes/card-info/CardInfo.svelte | 3 ++- ts/routes/card-info/[cardId]/[previousId]/+page.svelte | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ts/routes/card-info/CardInfo.svelte b/ts/routes/card-info/CardInfo.svelte index 12ef472be..020037dda 100644 --- a/ts/routes/card-info/CardInfo.svelte +++ b/ts/routes/card-info/CardInfo.svelte @@ -15,6 +15,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html export let stats: CardStatsResponse | null = null; export let showRevlog: boolean = true; + export let showCurve: boolean = true; $: fsrsEnabled = stats?.memoryState != null; $: desiredRetention = stats?.desiredRetention ?? 0.9; @@ -41,7 +42,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html {/if} - {#if fsrsEnabled} + {#if fsrsEnabled && showCurve} diff --git a/ts/routes/card-info/[cardId]/[previousId]/+page.svelte b/ts/routes/card-info/[cardId]/[previousId]/+page.svelte index c04cf483b..d52d65c76 100644 --- a/ts/routes/card-info/[cardId]/[previousId]/+page.svelte +++ b/ts/routes/card-info/[cardId]/[previousId]/+page.svelte @@ -12,6 +12,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 showCurve = $page.url.searchParams.get("curve") !== "0"; globalThis.anki ||= {}; globalThis.anki.updateCardInfos = async (card_id: string): Promise => { @@ -25,11 +26,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
{#if data.currentInfo}

Current

- + {/if} {#if data.previousInfo}

Previous

- + {/if}