2023-04-04 01:35:37 +02:00
|
|
|
import { ipcRenderer } from "electron";
|
2023-04-04 04:40:03 +02:00
|
|
|
import type { Settings } from "../main/settings";
|
2023-04-05 05:19:48 +02:00
|
|
|
import { FOCUS, GET_SETTINGS, RELAUNCH, SET_SETTINGS, SHOW_ITEM_IN_FOLDER } from "../shared/IpcEvents";
|
2023-04-04 01:35:37 +02:00
|
|
|
|
|
|
|
export const VencordDesktop = {
|
|
|
|
app: {
|
|
|
|
relaunch: () => ipcRenderer.invoke(RELAUNCH)
|
2023-04-04 04:40:03 +02:00
|
|
|
},
|
2023-04-05 05:19:48 +02:00
|
|
|
fileManager: {
|
|
|
|
showItemInFolder: (path: string) => ipcRenderer.invoke(SHOW_ITEM_IN_FOLDER, path)
|
2023-04-04 04:40:03 +02:00
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
get: () => ipcRenderer.sendSync(GET_SETTINGS),
|
|
|
|
set: (settings: typeof Settings) => ipcRenderer.invoke(SET_SETTINGS, settings)
|
2023-04-05 05:19:48 +02:00
|
|
|
},
|
|
|
|
win: {
|
|
|
|
focus: () => ipcRenderer.invoke(FOCUS)
|
2023-04-04 01:35:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|