Store/Settings: Rename `webframe` -> `webFrame` and respective import
This fixes an issue in which the user's preferred UI scaling was being ignored on startup.
This commit is contained in:
parent
0bd75d558f
commit
58bd0d1f36
|
@ -1,7 +1,6 @@
|
||||||
import Datastore from 'nedb'
|
import Datastore from 'nedb'
|
||||||
|
|
||||||
let dbLocation
|
let dbLocation
|
||||||
let webframe = null
|
|
||||||
|
|
||||||
const usingElectron = window?.process?.type === 'renderer'
|
const usingElectron = window?.process?.type === 'renderer'
|
||||||
|
|
||||||
|
@ -14,11 +13,9 @@ if (usingElectron) {
|
||||||
dbLocation = electron.remote.app.getPath('userData')
|
dbLocation = electron.remote.app.getPath('userData')
|
||||||
} */
|
} */
|
||||||
|
|
||||||
const electron = require('electron')
|
const { ipcRenderer } = require('electron')
|
||||||
const ipcRenderer = electron.ipcRenderer
|
|
||||||
dbLocation = ipcRenderer.sendSync('getUserDataPathSync')
|
dbLocation = ipcRenderer.sendSync('getUserDataPathSync')
|
||||||
dbLocation = dbLocation + '/settings.db'
|
dbLocation = dbLocation + '/settings.db'
|
||||||
webframe = electron.webframe
|
|
||||||
} else {
|
} else {
|
||||||
dbLocation = 'settings.db'
|
dbLocation = 'settings.db'
|
||||||
}
|
}
|
||||||
|
@ -225,8 +222,9 @@ Object.assign(actions, {
|
||||||
commit('setBarColor', result.value)
|
commit('setBarColor', result.value)
|
||||||
break
|
break
|
||||||
case 'uiScale':
|
case 'uiScale':
|
||||||
if (webframe) {
|
if (usingElectron) {
|
||||||
webframe.setZoomFactor(parseInt(result.value) / 100)
|
const { webFrame } = require('electron')
|
||||||
|
webFrame.setZoomFactor(parseInt(result.value) / 100)
|
||||||
}
|
}
|
||||||
commit('setUiScale', result.value)
|
commit('setUiScale', result.value)
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue