Init renderer, expose settings via ipc, init canary/ptb support

This commit is contained in:
Vendicated
2023-04-04 04:40:03 +02:00
parent 18a77d45b8
commit 79d73e23c0
8 changed files with 82 additions and 22 deletions
+9 -1
View File
@@ -1,9 +1,17 @@
import { ipcRenderer } from "electron";
import { RELAUNCH } from "../shared/IpcEvents";
import type { Settings } from "../main/settings";
import { GET_SETTINGS, RELAUNCH, SET_SETTINGS, SHOW_IN_FOLDER } from "../shared/IpcEvents";
export const VencordDesktop = {
app: {
relaunch: () => ipcRenderer.invoke(RELAUNCH)
},
files: {
showInFolder: (path: string) => ipcRenderer.invoke(SHOW_IN_FOLDER, path)
},
settings: {
get: () => ipcRenderer.sendSync(GET_SETTINGS),
set: (settings: typeof Settings) => ipcRenderer.invoke(SET_SETTINGS, settings)
}
}