mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-18 08:43:57 +00:00
feat: events working
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user