Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
146677d1c7 |
2 changed files with 13 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
import { app, dialog } from "electron";
|
||||
import { app, dialog, ipcMain } from "electron";
|
||||
import { createWindow } from './window';
|
||||
import { initSession } from './session';
|
||||
import { initAudioIO, stopStream } from './audio';
|
||||
|
|
@ -42,6 +42,11 @@ autoUpdater.on('update-downloaded', (info: any) => {
|
|||
async function main() {
|
||||
console.log("MAIN:Initializing Electron App.")
|
||||
|
||||
ipcMain.removeHandler('version');
|
||||
ipcMain.handle('version', (_event: any, _payload: any) => {
|
||||
return app.getVersion();
|
||||
})
|
||||
|
||||
// Must wait til window is created.
|
||||
await createWindow();
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { defineComponent, ref, onMounted } from "vue";
|
||||
import { useIpc } from "@/modules/ipc";
|
||||
import { logoutRequest } from '@/modules/message';
|
||||
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
setup() {
|
||||
const toggleSettings = ref(false);
|
||||
|
||||
const { post } = useIpc();
|
||||
const { post, invoke } = useIpc();
|
||||
|
||||
// Listen for escape key to close settings.
|
||||
const onEscape = (e: any) => {
|
||||
|
|
@ -59,6 +59,11 @@
|
|||
post("client-message", logoutRequest())
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
const version = await invoke('version', true);
|
||||
console.log(version);
|
||||
})
|
||||
|
||||
return {
|
||||
onActive,
|
||||
toggleSettings,
|
||||
|
|
|
|||
Loading…
Reference in a new issue