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