Save Night Mode settings via browser's IndexedDB or localStorage

Components

Hi, addition of Dark Mode to DTube is a must and I'm glad that it's there but currently there's one thing that bugs me. As soon as you reload the page it will forget your Dark Mode settings and You'll need to set it from scratch.

Proposal

Use IndexedDB (async) or localStorage (sync) to save user settings regarding Dark Mode when changing and as soon as app starts again check IdB or localStorage if it's set. If it is, programmatically
set Dark Mode to true globally, else do nothing.

Mockups / Examples

Refreshed page:
image.png

Benefits

User won't be blinded by light version of the page when visiting it
User Experience will improve (at average 2 clicks less every time he/she visits the website - Settings -> Dark Mode)
It will match competitiors (YouTube honestly) and Steemit.com behaviour



Posted on Utopian.io - Rewarding Open Source Contributors

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now