feature: night mode storage

This commit is contained in:
JimQing 2020-09-03 20:43:29 +08:00
parent 8d822ddbeb
commit a9379065db

View File

@ -70,7 +70,7 @@ const mutations = {
state.currentSize = localStorage.getItem('size') || config.sizeOption[2].value state.currentSize = localStorage.getItem('size') || config.sizeOption[2].value
state.codeTheme = localStorage.getItem('codeTheme') || config.codeThemeOption[0].value state.codeTheme = localStorage.getItem('codeTheme') || config.codeThemeOption[0].value
state.citeStatus = localStorage.getItem('citeStatus') === 'true' state.citeStatus = localStorage.getItem('citeStatus') === 'true'
state.nightMode = localStorage.getItem('nightMode') || false state.nightMode = localStorage.getItem('nightMode') === 'true'
state.wxRenderer = new WxRenderer({ state.wxRenderer = new WxRenderer({
theme: setColor(state.currentColor), theme: setColor(state.currentColor),
fonts: state.currentFont, fonts: state.currentFont,