mirror of
https://github.com/ankitects/anki.git
synced 2025-11-15 00:57:13 -05:00
* add elapsed time into revlog-table * add stability into revlog-table * add Graph of forgetting curve * fix eslint * add radio buttons of timeRange * add revlog filter && return [] for new card * format * translatable string & disable if using SM-2 * elapsedTime should skip manual or filtered review * add HoverColumns * fix eslint * add stability to tooltip & use timeSpan * reuse translatable strings * distinguish daysSinceFirstLearn and elapsedDaysSinceLastReview * Date x-axis & toLocaleString * Temporarily hide elapsed/stability columns (dae) https://github.com/ankitects/anki/pull/3437#issuecomment-2378851900
40 lines
1.2 KiB
Svelte
40 lines
1.2 KiB
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 type { CardStatsResponse } from "@generated/anki/stats_pb";
|
|
|
|
import Container from "$lib/components/Container.svelte";
|
|
import Row from "$lib/components/Row.svelte";
|
|
|
|
import CardInfoPlaceholder from "./CardInfoPlaceholder.svelte";
|
|
import CardStats from "./CardStats.svelte";
|
|
import Revlog from "./Revlog.svelte";
|
|
import ForgettingCurve from "./ForgettingCurve.svelte";
|
|
|
|
export let stats: CardStatsResponse | null = null;
|
|
export let showRevlog: boolean = true;
|
|
export let fsrsEnabled: boolean = stats?.memoryState != null;
|
|
</script>
|
|
|
|
<Container breakpoint="md" --gutter-inline="1rem" --gutter-block="0.5rem">
|
|
{#if stats}
|
|
<Row>
|
|
<CardStats {stats} />
|
|
</Row>
|
|
|
|
{#if showRevlog}
|
|
<Row>
|
|
<Revlog revlog={stats.revlog} {fsrsEnabled} />
|
|
</Row>
|
|
{/if}
|
|
{#if fsrsEnabled}
|
|
<Row>
|
|
<ForgettingCurve revlog={stats.revlog} />
|
|
</Row>
|
|
{/if}
|
|
{:else}
|
|
<CardInfoPlaceholder />
|
|
{/if}
|
|
</Container>
|