|
|
@ -3,13 +3,19 @@ import pkg from "../../package.json";
|
|
|
|
|
|
|
|
|
|
|
|
const updateSetting = () => {
|
|
|
|
const updateSetting = () => {
|
|
|
|
const parsedSettings = JSON.parse(localStorage.getItem("settings"));
|
|
|
|
const parsedSettings = JSON.parse(localStorage.getItem("settings"));
|
|
|
|
|
|
|
|
const {
|
|
|
|
|
|
|
|
playlistCategories,
|
|
|
|
|
|
|
|
showUnavailableSongInGreyStyle,
|
|
|
|
|
|
|
|
automaticallyCacheSongs,
|
|
|
|
|
|
|
|
nyancatStyle,
|
|
|
|
|
|
|
|
showLyricsTranslation,
|
|
|
|
|
|
|
|
} = initLocalStorage.settings;
|
|
|
|
const settings = {
|
|
|
|
const settings = {
|
|
|
|
playlistCategories: initLocalStorage?.settings?.playlistCategories,
|
|
|
|
playlistCategories,
|
|
|
|
showUnavailableSongInGreyStyle:
|
|
|
|
showUnavailableSongInGreyStyle,
|
|
|
|
initLocalStorage?.settings?.showUnavailableSongInGreyStyle,
|
|
|
|
automaticallyCacheSongs,
|
|
|
|
automaticallyCacheSongs:
|
|
|
|
nyancatStyle,
|
|
|
|
initLocalStorage?.settings?.automaticallyCacheSongs,
|
|
|
|
showLyricsTranslation,
|
|
|
|
nyancatStyle: initLocalStorage?.settings?.nyancatStyle,
|
|
|
|
|
|
|
|
...parsedSettings,
|
|
|
|
...parsedSettings,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|