mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 00:12:25 -04:00
Make showing of rangeBox based on parameter
This commit is contained in:
parent
5d117cf1a0
commit
ebc1a86b2e
2 changed files with 38 additions and 33 deletions
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
export let search: string;
|
export let search: string;
|
||||||
export let days: number;
|
export let days: number;
|
||||||
|
export let withRangeBox: boolean;
|
||||||
|
|
||||||
let sourceData: pb.BackendProto.GraphsOut | null = null;
|
let sourceData: pb.BackendProto.GraphsOut | null = null;
|
||||||
|
|
||||||
|
@ -95,6 +96,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
{#if withRangeBox}
|
||||||
<div class="range-box">
|
<div class="range-box">
|
||||||
<div class="spin {refreshing ? 'active' : ''}">◐</div>
|
<div class="spin {refreshing ? 'active' : ''}">◐</div>
|
||||||
|
|
||||||
|
@ -133,6 +135,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="range-box-pad" />
|
<div class="range-box-pad" />
|
||||||
|
{/if}
|
||||||
|
|
||||||
<div tabindex="-1" class="no-focus-outline">
|
<div tabindex="-1" class="no-focus-outline">
|
||||||
{#if sourceData}
|
{#if sourceData}
|
||||||
|
|
|
@ -21,6 +21,7 @@ export function graphs(
|
||||||
graphs: any[], {
|
graphs: any[], {
|
||||||
search = "deck:current",
|
search = "deck:current",
|
||||||
days = 31,
|
days = 31,
|
||||||
|
withRangeBox = true,
|
||||||
} = {},
|
} = {},
|
||||||
): void {
|
): void {
|
||||||
const nightMode = checkNightMode();
|
const nightMode = checkNightMode();
|
||||||
|
@ -34,6 +35,7 @@ export function graphs(
|
||||||
nightMode,
|
nightMode,
|
||||||
search,
|
search,
|
||||||
days,
|
days,
|
||||||
|
withRangeBox,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue