mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-23 02:41:02 +00:00
feat: adding initial download sources
This commit is contained in:
@@ -100,8 +100,8 @@ contextBridge.exposeInMainWorld("electron", {
|
||||
/* Download sources */
|
||||
putDownloadSource: (objectIds: string[]) =>
|
||||
ipcRenderer.invoke("putDownloadSource", objectIds),
|
||||
createDownloadSource: (url: string) =>
|
||||
ipcRenderer.invoke("createDownloadSource", url),
|
||||
createDownloadSources: (urls: string[]) =>
|
||||
ipcRenderer.invoke("createDownloadSources", urls),
|
||||
removeDownloadSource: (url: string, removeAll?: boolean) =>
|
||||
ipcRenderer.invoke("removeDownloadSource", url, removeAll),
|
||||
getDownloadSources: () => ipcRenderer.invoke("getDownloadSources"),
|
||||
@@ -200,6 +200,15 @@ contextBridge.exposeInMainWorld("electron", {
|
||||
return () =>
|
||||
ipcRenderer.removeListener("on-achievement-unlocked", listener);
|
||||
},
|
||||
onExtractionComplete: (cb: (shop: GameShop, objectId: string) => void) => {
|
||||
const listener = (
|
||||
_event: Electron.IpcRendererEvent,
|
||||
shop: GameShop,
|
||||
objectId: string
|
||||
) => cb(shop, objectId);
|
||||
ipcRenderer.on("on-extraction-complete", listener);
|
||||
return () => ipcRenderer.removeListener("on-extraction-complete", listener);
|
||||
},
|
||||
|
||||
/* Hardware */
|
||||
getDiskFreeSpace: (path: string) =>
|
||||
|
||||
Reference in New Issue
Block a user