YesPlayMusic/src/store/initLocalStorage.js
GalvinGao 42f3da9b37
feat: add reversed mode & improvements to lyrics animation (#1226)
* feat(reversed-mode): add reversed mode & improvements to lyrics animation

* feat(lyrics-animation): improve `:active` style

* fix: extra white space after artist in lyrics view

* refactor: remove unused function

* feat: slightly add duration of transition to improve replication from Apple Music style
2022-01-14 15:30:19 +08:00

51 lines
1.2 KiB
JavaScript

import { playlistCategories } from '@/utils/staticData';
import shortcuts from '@/utils/shortcuts';
console.debug('[debug][initLocalStorage.js]');
const enabledPlaylistCategories = playlistCategories
.filter(c => c.enable)
.map(c => c.name);
let localStorage = {
player: {},
settings: {
lang: null,
musicLanguage: 'all',
appearance: 'auto',
musicQuality: 320000,
lyricFontSize: 28,
outputDevice: 'default',
showPlaylistsByAppleMusic: true,
enableUnblockNeteaseMusic: true,
automaticallyCacheSongs: true,
cacheLimit: 8192,
enableReversedMode: false,
nyancatStyle: false,
showLyricsTranslation: true,
lyricsBackground: true,
closeAppOption: 'ask',
enableDiscordRichPresence: false,
enableGlobalShortcut: true,
showLibraryDefault: false,
subTitleDefault: false,
enabledPlaylistCategories,
proxyConfig: {
protocol: 'noProxy',
server: '',
port: null,
},
shortcuts: shortcuts,
},
data: {
user: {},
likedSongPlaylistID: 0,
lastRefreshCookieDate: 0,
loginMode: null,
},
};
if (process.env.IS_ELECTRON === true) {
localStorage.settings.automaticallyCacheSongs = true;
}
export default localStorage;