mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Warn if no day is set to Normal (#3557)
This commit is contained in:
parent
ac731624e1
commit
eb393aeaee
2 changed files with 9 additions and 0 deletions
|
@ -290,6 +290,7 @@ deck-config-easy-days-sunday = Sunday
|
|||
deck-config-easy-days-normal = Normal
|
||||
deck-config-easy-days-reduced = Reduced
|
||||
deck-config-easy-days-minimum = Minimum
|
||||
deck-config-easy-days-no-normal-days = At least one day should be set to '{ deck-config-easy-days-normal }'.
|
||||
|
||||
## Adding/renaming
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
import Item from "$lib/components/Item.svelte";
|
||||
import TitledContainer from "$lib/components/TitledContainer.svelte";
|
||||
import type { DeckOptionsState } from "./lib";
|
||||
import Warning from "./Warning.svelte";
|
||||
|
||||
export let state: DeckOptionsState;
|
||||
export let api: Record<string, never>;
|
||||
|
@ -20,6 +21,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
$config.easyDaysPercentages = defaults.easyDaysPercentages;
|
||||
}
|
||||
|
||||
$: noNormalDay = $config.easyDaysPercentages.some((p) => p === 1.0)
|
||||
? ""
|
||||
: tr.deckConfigEasyDaysNoNormalDays();
|
||||
|
||||
const easyDays = [
|
||||
tr.deckConfigEasyDaysMonday(),
|
||||
tr.deckConfigEasyDaysTuesday(),
|
||||
|
@ -81,6 +86,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
</table>
|
||||
</div>
|
||||
</Item>
|
||||
<Item>
|
||||
<Warning warning={noNormalDay} />
|
||||
</Item>
|
||||
</DynamicallySlottable>
|
||||
</TitledContainer>
|
||||
|
||||
|
|
Loading…
Reference in a new issue