handle invoke in IPC
This commit is contained in:
1 parent
fd80a831e1
commit
1b015078a6
2 files changed
+3
-3
No files matched your search
+2
-2
@@ -7,8 +7,8 @@ import Constants from './utils/Constants'
|
|||||||
export default class IPCs {
|
export default class IPCs {
|
||||||
static initialize(): void {
|
static initialize(): void {
|
||||||
// Get application version
|
// Get application version
|
||||||
ipcMain.on('msgRequestGetVersion', (event: IpcMainEvent) => {
|
ipcMain.handle('msgRequestGetVersion', () => {
|
||||||
event.returnValue = Constants.APP_VERSION
|
return Constants.APP_VERSION
|
||||||
})
|
})
|
||||||
|
|
||||||
// Open url via web browser
|
// Open url via web browser
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ onMounted((): void => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const getApplicationVersionFromMainProcess = (): void => {
|
const getApplicationVersionFromMainProcess = (): void => {
|
||||||
window.mainApi.invoke('msgRequestGetVersion').then((result: string) => appVersion.value = result)
|
window.mainApi.invoke('msgRequestGetVersion').then((result: string) => { appVersion.value = result })
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleChangeTheme = (): void => {
|
const handleChangeTheme = (): void => {
|
||||||
|
|||||||
Reference in new issue
Block a user