mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
Add CountMethodRadios and CardCountMethod enum
This commit is contained in:
parent
94fe1f898f
commit
47551df2f9
2 changed files with 25 additions and 0 deletions
19
ts/graphs/CountMethodRadios.svelte
Normal file
19
ts/graphs/CountMethodRadios.svelte
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
<script lang="typescript">
|
||||||
|
import type { I18n } from "anki/i18n";
|
||||||
|
import { CardCountMethod } from "./graph-helpers";
|
||||||
|
|
||||||
|
export let i18n: I18n;
|
||||||
|
export let cardCountMethod: CardCountMethod;
|
||||||
|
|
||||||
|
const byType = "By card type";
|
||||||
|
const byQueue = "By scheduling Queue";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<label>
|
||||||
|
<input type="radio" bind:group={cardCountMethod} value={CardCountMethod.ByType} />
|
||||||
|
{byType}
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="radio" bind:group={cardCountMethod} value={CardCountMethod.ByQueue} />
|
||||||
|
{byQueue}
|
||||||
|
</label>
|
|
@ -33,6 +33,12 @@ export enum GraphRange {
|
||||||
AllTime = 3,
|
AllTime = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// how card should be counted
|
||||||
|
export enum CardCountMethod {
|
||||||
|
ByType = 0,
|
||||||
|
ByQueue = 1,
|
||||||
|
}
|
||||||
|
|
||||||
export interface GraphsContext {
|
export interface GraphsContext {
|
||||||
cards: pb.BackendProto.Card[];
|
cards: pb.BackendProto.Card[];
|
||||||
revlog: pb.BackendProto.RevlogEntry[];
|
revlog: pb.BackendProto.RevlogEntry[];
|
||||||
|
|
Loading…
Reference in a new issue