mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: events working
This commit is contained in:
parent
3b17953a82
commit
811878e364
12 changed files with 182 additions and 82 deletions
|
@ -1,9 +1,5 @@
|
|||
import type { Downloader, GameStatus } from "@shared";
|
||||
import {
|
||||
ProgressInfo,
|
||||
UpdateDownloadedEvent,
|
||||
UpdateInfo,
|
||||
} from "electron-updater";
|
||||
import { ProgressInfo, UpdateInfo } from "electron-updater";
|
||||
|
||||
export type GameShop = "steam" | "epic";
|
||||
export type CatalogueCategory = "recently_added" | "trending";
|
||||
|
@ -149,31 +145,11 @@ export interface SteamGame {
|
|||
clientIcon: string | null;
|
||||
}
|
||||
|
||||
interface ErrorEvent {
|
||||
error: Error;
|
||||
message?: string;
|
||||
}
|
||||
|
||||
interface UpdateNotAvailable {
|
||||
info: UpdateInfo;
|
||||
}
|
||||
interface UpdateAvailable {
|
||||
info: UpdateInfo;
|
||||
}
|
||||
interface UpdateDownloaded {
|
||||
event: UpdateDownloadedEvent;
|
||||
}
|
||||
interface DownloadProgress {
|
||||
info: ProgressInfo;
|
||||
}
|
||||
interface UpdateCancelled {
|
||||
info: UpdateInfo;
|
||||
}
|
||||
|
||||
export type AppUpdaterEvents =
|
||||
| ErrorEvent
|
||||
| UpdateNotAvailable
|
||||
| UpdateAvailable
|
||||
| UpdateDownloaded
|
||||
| DownloadProgress
|
||||
| UpdateCancelled;
|
||||
| { type: "error" }
|
||||
| { type: "checking-for-updates" }
|
||||
| { type: "update-not-available"; info: UpdateInfo }
|
||||
| { type: "update-available"; info: UpdateInfo }
|
||||
| { type: "update-downloaded" }
|
||||
| { type: "download-progress"; info: ProgressInfo }
|
||||
| { type: "update-cancelled"; info: UpdateInfo };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue