YesPlayMusic/src/store/initLocalStorage.js
memorydream d424f2cad5
fix: 修改歌名翻译的实现,以避免展示重复的信息 (#958)
* change song translate impl

* i18n

* 修改个变量名

* bug fix?
2021-10-11 10:18:49 +08:00

50 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,
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;