Make clicking notifications focus VC Desktop

This commit is contained in:
Vendicated
2023-04-05 05:19:48 +02:00
parent 2efed86b71
commit cf23b6d028
7 changed files with 36 additions and 7 deletions

View File

@@ -1,17 +1,20 @@
import { ipcRenderer } from "electron";
import type { Settings } from "../main/settings";
import { GET_SETTINGS, RELAUNCH, SET_SETTINGS, SHOW_IN_FOLDER } from "../shared/IpcEvents";
import { FOCUS, GET_SETTINGS, RELAUNCH, SET_SETTINGS, SHOW_ITEM_IN_FOLDER } from "../shared/IpcEvents";
export const VencordDesktop = {
app: {
relaunch: () => ipcRenderer.invoke(RELAUNCH)
},
files: {
showInFolder: (path: string) => ipcRenderer.invoke(SHOW_IN_FOLDER, path)
fileManager: {
showItemInFolder: (path: string) => ipcRenderer.invoke(SHOW_ITEM_IN_FOLDER, path)
},
settings: {
get: () => ipcRenderer.sendSync(GET_SETTINGS),
set: (settings: typeof Settings) => ipcRenderer.invoke(SET_SETTINGS, settings)
},
win: {
focus: () => ipcRenderer.invoke(FOCUS)
}
}