Slide 121
Slide 121 text
updateTimeFormat ({ dispatch, commit, state }, value) {
const newGeneral = Object.assign({}, state.general, {
timeFormat: value
})
const config = {
general: newGeneral
}
ipcRenderer.send('update-preferences', config)
ipcRenderer.once('error-update-preferences', (event, err) => {
ipcRenderer.removeAllListeners('response-update-preferences')
})
ipcRenderer.once('response-update-preferences', (event, conf) => {
ipcRenderer.removeAllListeners('error-update-preferences')
dispatch('App/loadPreferences', null, { root: true })
commit('updateGeneral', conf.general)
})
},
actionͻͱ͔ͭ͠ҾΛऔΕͳ͍
mainͱͷ௨৴ipcͰߦ͏
ະͷΦϒδΣΫτ