Anki/ts/routes/deck-options
Arthur Milchior b08e454f57
If deck options are modified, ask before closing (#3410)
* If deck options are modified, ask before closing

This imitates the way the note editor behaves. If a user assumes by
error that chanhges are automatically saved, it ensures they won't
lose them.

Also, this will eventually allows to have the same feature on
AnkiDroid. While, currently, we always ask the user whether they want
to close the deck options, even when there are no modification, which
seems to regularly frustate users (including myself).

I'm new to Svelte, please let me know whether there is a better way to
obtain the information from Svelte state that I missed.

Note that I ensured that only a boolean can be obtained. I didn't
cause the whole state to be accessible. May be useful for some
add-ons, I guess, but risks breaking too much things.

Regarding the deckoptions.py, I tried to imitate addcards.py way to
check whether the add card view can be closed. Reusing the same
function and variable name when possible.

* Update qt/aqt/deckoptions.py (dae)
2024-09-22 18:07:24 +10:00
..
[deckId] If deck options are modified, ask before closing (#3410) 2024-09-22 18:07:24 +10:00
Addons.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
AdvancedOptions.svelte Move 'ignore reviews before' to advanced (#3381) 2024-08-29 19:11:56 +07:00
AudioOptions.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
AutoAdvance.svelte Update AutoAdvance.svelte (#3313) 2024-07-21 20:49:42 +07:00
BuryOptions.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
CardStateCustomizer.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
choices.ts Feature Show Reminder before answer (#3064) (#3119) 2024-04-13 08:39:50 +01:00
ConfigSelector.svelte Clean up #3167 (#3186) 2024-05-01 20:08:19 +10:00
DailyLimits.svelte Update dprint (#3376) 2024-08-22 18:24:56 +07:00
DateInput.svelte Move 'ignore reviews before' to advanced (#3381) 2024-08-29 19:11:56 +07:00
deck-options-base.scss Fix deck config input's background color regression (#3258) 2024-06-28 18:52:51 +07:00
DeckOptionsPage.svelte Fix Svelte exports not working in Deck Options (#3382) 2024-08-29 19:12:18 +07:00
DisplayOrder.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
FsrsOptions.svelte Fix FSRS progress update issues (#3420) 2024-09-20 21:18:02 +10:00
FsrsOptionsOuter.svelte Move 'ignore reviews before' to advanced (#3381) 2024-08-29 19:11:56 +07:00
GlobalLabel.svelte Svg icon (#3135) 2024-04-24 02:37:31 +01:00
HtmlAddon.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
index.ts Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
LapseOptions.svelte Fix minimum interval warning shown when FSRS is enabled (#3409) 2024-09-11 02:21:49 +07:00
lib.test.ts Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
lib.ts If deck options are modified, ask before closing (#3410) 2024-09-22 18:07:24 +10:00
NewOptions.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
SaveButton.svelte Improve and unify web dialog styling (#3167) 2024-05-01 17:49:57 +10:00
SpinBoxFloatRow.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
SpinBoxRow.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
steps.test.ts Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
steps.ts Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
StepsInput.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
StepsInputRow.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
TabbedValue.svelte Improve and unify web dialog styling (#3167) 2024-05-01 17:49:57 +10:00
TextInputModal.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
TimerOptions.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
Warning.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
WeightsInput.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
WeightsInputRow.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
WeightsSearchRow.svelte Fix deck config input's background color regression (#3258) 2024-06-28 18:52:51 +07:00