Implement local save and load buttons #28

Merged
mslw merged 15 commits from local-save into master 2022-06-29 09:20:26 +00:00

2022-06-28

Prettify local loading script
Used prettier with almost default settings to convert all indents
to spaces; unify quote symbols, spaces around brackets and the like.
2022-06-28 18:10:09 +02:00
Prettify local saving script
Used prettier with almost default settings to convert all indents
to spaces; unify quote symbols, spaces around brackets and the like.

Tweaked spaces between script blocks.
2022-06-28 17:52:05 +02:00

2022-06-22

Refactor local load and clean up the code
Divided the loading functions a little bit to make it clearer
how event listeners go (file loading is based on events).

Moved the invisible file input field definition to html and adjusted
the way events are triggered.
2022-06-22 19:02:26 +02:00
Clean the form on load and handle go/no-go
This is my best attempt at returning the form to a clean state,
so that incomplete entries don't mess with loaded ones.
Because form.reset() resets the sliders which enable/disable fields
without triggering related events, this includes explicitly setting
the disabled property.

Some go/no-go fields trigger events which show more related fields.
These get special handling in this commit.
2022-06-22 17:33:52 +02:00

2022-06-13

Draft the local save with JavaScript
Almost everything will change, but this commit introduces building
blocks for a functional "local save" button.
2022-06-13 20:13:29 +02:00
Refactor getContentString()
Refactored getContentString() to allow different representations
(string, array, or object) in preparation for local saving.

This preserves getContentString() behaviour, while adding an easy
way to create an object to be saved.
2022-06-13 20:13:29 +02:00