-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ankitects:main' into lazy_static-to-once_cell-to-stabil…
…ized
- Loading branch information
Showing
13 changed files
with
403 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
24.06.3 | ||
24.10 |
Submodule core-repo
updated
13 files
+8 −0 | core/el/statistics.ftl | |
+14 −14 | core/he/actions.ftl | |
+1 −0 | core/he/editing.ftl | |
+13 −0 | core/he/statistics.ftl | |
+6 −0 | core/templates/card-stats.ftl | |
+1 −0 | core/ug/editing.ftl | |
+13 −0 | core/ug/statistics.ftl | |
+13 −0 | core/uk/statistics.ftl | |
+23 −0 | core/yi/deck-config.ftl | |
+21 −21 | core/zh-CN/deck-config.ftl | |
+1 −0 | core/zh-CN/editing.ftl | |
+13 −0 | core/zh-CN/statistics.ftl | |
+13 −0 | core/zh-TW/statistics.ftl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule qt-repo
updated
2 files
+1 −0 | desktop/templates/qt-accel.ftl | |
+2 −1 | desktop/templates/qt-misc.ftl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<!-- | ||
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_StatsRevlogEntry as RevlogEntry } from "@generated/anki/stats_pb"; | ||
import * as tr from "@generated/ftl"; | ||
import Graph from "../graphs/Graph.svelte"; | ||
import NoDataOverlay from "../graphs/NoDataOverlay.svelte"; | ||
import AxisTicks from "../graphs/AxisTicks.svelte"; | ||
import { writable } from "svelte/store"; | ||
import InputBox from "../graphs/InputBox.svelte"; | ||
import { prepareData, renderForgettingCurve, TimeRange } from "./forgetting-curve"; | ||
import { defaultGraphBounds } from "../graphs/graph-helpers"; | ||
import HoverColumns from "../graphs/HoverColumns.svelte"; | ||
export let revlog: RevlogEntry[]; | ||
let svg = null as HTMLElement | SVGElement | null; | ||
const bounds = defaultGraphBounds(); | ||
const timeRange = writable(TimeRange.AllTime); | ||
const title = tr.cardStatsFsrsForgettingCurveTitle(); | ||
const data = prepareData(revlog, TimeRange.AllTime); | ||
$: renderForgettingCurve(revlog, $timeRange, svg as SVGElement, bounds); | ||
</script> | ||
|
||
<div class="forgetting-curve"> | ||
<InputBox> | ||
<div class="time-range-selector"> | ||
<label> | ||
<input type="radio" bind:group={$timeRange} value={TimeRange.Week} /> | ||
{tr.cardStatsFsrsForgettingCurveFirstWeek()} | ||
</label> | ||
<label> | ||
<input type="radio" bind:group={$timeRange} value={TimeRange.Month} /> | ||
{tr.cardStatsFsrsForgettingCurveFirstMonth()} | ||
</label> | ||
{#if data.length > 0 && data.some((point) => point.daysSinceFirstLearn > 365)} | ||
<label> | ||
<input | ||
type="radio" | ||
bind:group={$timeRange} | ||
value={TimeRange.Year} | ||
/> | ||
{tr.cardStatsFsrsForgettingCurveFirstYear()} | ||
</label> | ||
{/if} | ||
<label> | ||
<input type="radio" bind:group={$timeRange} value={TimeRange.AllTime} /> | ||
{tr.cardStatsFsrsForgettingCurveAllTime()} | ||
</label> | ||
</div> | ||
</InputBox> | ||
<Graph {title}> | ||
<svg bind:this={svg} viewBox={`0 0 ${bounds.width} ${bounds.height}`}> | ||
<AxisTicks {bounds} /> | ||
<HoverColumns /> | ||
<NoDataOverlay {bounds} /> | ||
</svg> | ||
</Graph> | ||
</div> | ||
|
||
<style> | ||
.forgetting-curve { | ||
width: 100%; | ||
max-width: 50em; | ||
} | ||
.time-range-selector { | ||
display: flex; | ||
justify-content: space-around; | ||
margin-bottom: 1em; | ||
width: 100%; | ||
max-width: 50em; | ||
} | ||
.time-range-selector label { | ||
display: flex; | ||
align-items: center; | ||
} | ||
.time-range-selector input { | ||
margin-right: 0.5em; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.