handle invoke in IPC

This commit is contained in:
lnrdnl committed 2024-02-20 15:32:17 +01:00
1 parent fd80a831e1
commit 1b015078a6
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -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
+1 -1
View File
@@ -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 => {