Anki/ts/routes
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
..
card-info Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
change-notetype Improve and unify web dialog styling (#3167) 2024-05-01 17:49:57 +10:00
congrats Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
deck-options If deck options are modified, ask before closing (#3410) 2024-09-22 18:07:24 +10:00
graphs Add comment about the usage of the input field in the statistics page (#3394) (#3398) 2024-09-20 20:47:04 +10:00
image-occlusion Fix occlusion rounding bug (#3400) 2024-09-20 20:48:44 +10:00
import-anki-package Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
import-csv Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
import-page Clean up #3167 (#3186) 2024-05-01 20:08:19 +10:00
tmp Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
+error.svelte Include error message text on page 2024-06-24 15:35:47 +07:00
+layout.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
+layout.ts Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
base.scss Fix deck config input's background color regression (#3258) 2024-06-28 18:52:51 +07:00