mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 10:55:30 -04:00
By default use the system theme setting (#111)
This commit is contained in:
parent
66a3cc268b
commit
4e707076a1
@ -63,7 +63,7 @@ const validThemeSetting = (theme) => {
|
||||
*/
|
||||
const loadThemeSetting = () => {
|
||||
let str = localStorage.getItem('theme');
|
||||
if (!str || !validThemeSetting(str)) str = 'light';
|
||||
if (!str || !validThemeSetting(str)) str = 'system';
|
||||
return str;
|
||||
};
|
||||
|
||||
@ -88,7 +88,7 @@ const loadTheme = () => {
|
||||
* @param {string} setting - A theme setting
|
||||
*/
|
||||
const saveThemeSetting = setting => {
|
||||
if (!validThemeSetting(setting)) setting = 'light';
|
||||
if (!validThemeSetting(setting)) setting = 'system';
|
||||
localStorage.setItem('theme', setting);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user