Add CountMethodRadios and CardCountMethod enum
This commit is contained in:
parent
94fe1f898f
commit
47551df2f9
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,
|
||||
}
|
||||
|
||||
// how card should be counted
|
||||
export enum CardCountMethod {
|
||||
ByType = 0,
|
||||
ByQueue = 1,
|
||||
}
|
||||
|
||||
export interface GraphsContext {
|
||||
cards: pb.BackendProto.Card[];
|
||||
revlog: pb.BackendProto.RevlogEntry[];
|
||||
|
Loading…
Reference in New Issue
Block a user