Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added reset/load/save settings #65

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Added reset/load/save settings #65

wants to merge 4 commits into from

Conversation

DarkMatterMatt
Copy link
Contributor

Added reset/load/save settings

Settings page:

  • Added reset settings button (resets to default)
  • Added save/load custom settings button (stored in localStorage.settings)
    Save/load buttons are hidden when localStorage is no accessible
    Load button is hidden when there is nothing to load

loadSettings now loads saved custom settings by default if all settings are default (if the user likes the default settings, then they can save default settings as custom settings so they aren't forced off the default settings or they can simply not save the custom settings)

Added reset/load/save settings

Settings page:
- Added reset settings button (resets to default)
- Added save/load custom settings button (stored in localStorage.settings)
Save/load buttons are hidden when localStorage is no accessible
Load button is hidden when there is nothing to load

loadSettings now loads saved custom settings by default if all settings are default (if the user likes the default settings, then they can save default settings as custom settings so they aren't forced off the default settings or they can simply not save the custom settings)
Changed saveSettingsLocalStorage to get all the current settings, then delete the ones _not_ in a list of ones we want.

Changed loadSettingsLocalStorage to handle missing (default) `settings.data` data-set.

Changed reset settings to only get current settings then delete only settings to reset
Moved list of names of settings that are saved in localStorage to its own array called `LOCALSTORAGE_SAVED_SETTINGS` (updated events accordingly)
@filipre
Copy link

filipre commented Feb 1, 2019

Any updates on this? It probably needs a new review but is there any reason not to merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants