undo button - not functional yet but gives a good idea of what will happen

This commit is contained in:
Andrew Gundersen 2021-03-31 08:41:13 -05:00
commit f89c9944e7
13 changed files with 137 additions and 18 deletions

View file

@ -1,6 +1,6 @@
import fs from 'fs';
import { backgroundMitt } from "@/modules/emitter";
import { SessionState, WindowState } from "@/types/message";
import { SessionState, WindowState } from "@/types";
export const ipcEmit = (channel: string, payload: any) => {

View file

@ -37,9 +37,11 @@ export function initApp(dev: boolean): void {
main()
});
// Must keep to ensure app doesn't quit on close.
app.on("before-quit", () => {
});
// Must keep to ensure app doesn't quit on close.
app.on("window-all-closed", () => {
});

View file

@ -16,7 +16,7 @@ import useWebSockets from "@/modules/websockets";
import { play } from "./audio";
import { renderMessage } from "@/modules/message";
import { AuthProtocol, SessionState, Profile } from "@/types/message";
import { AuthProtocol, SessionState, Profile } from "@/types";
let win = true;

View file

@ -3,10 +3,9 @@
import { BrowserWindow, ipcMain } from "electron";
import { createProtocol } from "vue-cli-plugin-electron-builder/lib";
import { backgroundMitt } from '@/modules/emitter';
import { RenderMessage, WindowState } from "@/types/message/index";
import { RenderMessage, WindowState } from "@/types";
import { loadWinState, saveToJson } from "./helpers";
import * as path from "path";
import fs from 'fs';
interface IpcRendererPayload {
endpoint: string;