mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: display upload speed during seeding
This commit is contained in:
parent
8ec52bf193
commit
56687948bf
6 changed files with 54 additions and 7 deletions
|
@ -11,6 +11,7 @@ import type {
|
|||
GameRunning,
|
||||
FriendRequestAction,
|
||||
UpdateProfileRequest,
|
||||
SeedingStatus,
|
||||
} from "@types";
|
||||
import type { CatalogueCategory } from "@shared";
|
||||
import type { AxiosProgressEvent } from "axios";
|
||||
|
@ -38,6 +39,14 @@ contextBridge.exposeInMainWorld("electron", {
|
|||
ipcRenderer.on("on-download-progress", listener);
|
||||
return () => ipcRenderer.removeListener("on-download-progress", listener);
|
||||
},
|
||||
onSeedingStatus: (cb: (value: SeedingStatus[]) => void) => {
|
||||
const listener = (
|
||||
_event: Electron.IpcRendererEvent,
|
||||
value: SeedingStatus[]
|
||||
) => cb(value);
|
||||
ipcRenderer.on("on-seeding-status", listener);
|
||||
return () => ipcRenderer.removeListener("on-seeding-status", listener);
|
||||
},
|
||||
|
||||
/* Catalogue */
|
||||
searchGames: (query: string) => ipcRenderer.invoke("searchGames", query),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue