mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-25 11:25:56 +00:00
feat(races): integrate client patch installation and controls
This commit is contained in:
1 parent
06ca748e80
commit
1228807eaf
6 files changed
+658
-6
No files matched your search
@@ -379,6 +379,22 @@ export interface ClientDownloadCheck {
|
||||
dest: string;
|
||||
}
|
||||
|
||||
export type ClientPatchState = "not-installed" | "enabled" | "disabled" | "partially-installed";
|
||||
|
||||
export interface CustomRacesClientStatus {
|
||||
state: ClientPatchState;
|
||||
installedMpqs: number;
|
||||
totalMpqs: number;
|
||||
hasRootFiles: boolean;
|
||||
clientPath: string | null;
|
||||
}
|
||||
|
||||
export interface CustomRacesProgress {
|
||||
id: string;
|
||||
step: string;
|
||||
percent: number;
|
||||
}
|
||||
|
||||
export type FriendsMode = "local" | "lan" | "direct" | "private";
|
||||
|
||||
export interface LanAddress {
|
||||
@@ -503,6 +519,9 @@ export const api = {
|
||||
clientSync: (id: string, keepModified: boolean) => invoke<void>("client_sync", { id, keepModified }),
|
||||
clientDownload: (id: string, parent: string) => invoke<ClientInfo>("client_download", { id, parent }),
|
||||
clientCancel: () => invoke<void>("client_cancel"),
|
||||
customRacesStatus: (id: string) => invoke<CustomRacesClientStatus | null>("custom_races_status", { id }),
|
||||
customRacesInstall: (id: string) => invoke<void>("custom_races_install", { id }),
|
||||
customRacesToggleClient: (id: string, enabled: boolean) => invoke<void>("custom_races_toggle_client", { id, enabled }),
|
||||
play: (id: string) => invoke<DriverOutcome>("play", { id }),
|
||||
friendsStatus: (id: string) => invoke<FriendsStatus>("friends_status", { id }),
|
||||
friendsCheckInternet: () => invoke<InternetCheck>("friends_check_internet"),
|
||||
|
||||
Reference in new issue
Block a user