feat: add show lyrics translation to settings

This commit is contained in:
qier222 2021-01-07 15:10:06 +08:00
parent d4be289946
commit 0dd30e251f
6 changed files with 53 additions and 9 deletions

View file

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