krmanik / Anki-xiehanzi

Learn, read, write and practice Mandarin by drawing strokes in Anki Desktop, AnkiDroid and AnkiMobile with audio of HSK 2.0 (HSK1-6) and HSK 3.0 (HSK 1-9) characters.
https://krmanik.github.io/Anki-xiehanzi
Other
157 stars 17 forks source link

Add ability to save default preferences (in sidebar) #30

Closed camerooncameroon closed 4 months ago

camerooncameroon commented 1 year ago

Is your feature request related to a problem? Please describe. Every session need to enable/disable parameters in sidebar, as they reset every time you start a new session (reload Ankidroid).

Describe the solution you'd like Add ability to save default preferences between sessions and/or reloads of Ankidroid (in UI or like in previous version - in the code itself by changing True to False and vice versa in default active/inactive section of code - in new version code I didn't find anything of this kind).

Describe alternatives you've considered Tried to find appropriate pieces of code but didn't find any (unlike in previous version, where it was clearly set in code).

<script>
    var default_show_outline = true;
    var default_practice_simplified = false;
    var default_show_simplified = false;
    var default_show_traditional = false;
    var default_show_pinyin = false;
    var default_show_meaning = false;
</script>

Additional context Offtop: Where is the color for grid lines set? New color is too dark for me (almost not seen), but the previous, again, was too light ). Would be great to make it a bit lighter grey.

krmanik commented 1 year ago

I thought about removing was that localStorage is available on Anki desktop, AnkiDroid and AnkiMobile. But now it seems that the localStorage is not beneficial in case of Anki Desktop, so I think I should add the default settings. I will update in next release.

I will extract each settings to sidebar so that it will be easier to configure as per requirements. More options will be added to the sidebar in next release.