mirror of
https://github.com/celisej567/Vesktop.git
synced 2026-09-13 20:12:49 +03:00
22 lines
701 B
TypeScript
22 lines
701 B
TypeScript
import { app, ipcRenderer } from "electron";
|
|
import type { Settings } from "../main/settings";
|
|
import { FOCUS, GET_SETTINGS, RELAUNCH, SET_SETTINGS, SHOW_ITEM_IN_FOLDER } from "../shared/IpcEvents";
|
|
|
|
export const VencordDesktopNative = {
|
|
app: {
|
|
relaunch: () => ipcRenderer.invoke(RELAUNCH),
|
|
getVersion: () => app.getVersion()
|
|
},
|
|
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)
|
|
}
|
|
}
|
|
|