fix: do not register new ipc event listener when main screen component is loaded (fixes #176)

This commit is contained in:
leejooy96 committed 2024-01-10 16:00:34 +09:00
1 parent 52ffc48cde
commit a71feb8a08
5 files changed
+46 -19

No files matched your search

+5 -4
View File
@@ -17,12 +17,13 @@ onMounted((): void => {
languages.value = availableLocales
// Get application version from package.json version string (Using IPC communication)
window.mainApi.receive('msgReceivedVersion', (event: Event, version: string) => {
appVersion.value = version
})
window.mainApi.send('msgRequestGetVersion')
getApplicationVersionFromMainProcess()
})
const getApplicationVersionFromMainProcess = (): void => {
appVersion.value = window.mainApi.sendSync('msgRequestGetVersion')
}
const handleChangeTheme = (): void => {
theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark'
}