2024-10-17 21:05:25 +11:00
|
|
|
import type { Component } from "vue";
|
2024-10-15 20:05:13 +11:00
|
|
|
|
|
|
|
|
export type NavigationItem = {
|
2024-10-17 21:05:25 +11:00
|
|
|
prefix: string;
|
|
|
|
|
route: string;
|
|
|
|
|
label: string;
|
|
|
|
|
};
|
2024-10-15 20:05:13 +11:00
|
|
|
|
|
|
|
|
export type QuickActionNav = {
|
2024-10-17 21:05:25 +11:00
|
|
|
icon: Component;
|
|
|
|
|
notifications?: number;
|
|
|
|
|
action: () => Promise<void>;
|
|
|
|
|
};
|
2024-12-09 17:03:48 +11:00
|
|
|
|
|
|
|
|
export type User = {
|
|
|
|
|
id: string;
|
|
|
|
|
username: string;
|
|
|
|
|
admin: boolean;
|
|
|
|
|
displayName: string;
|
2025-05-15 10:13:24 +10:00
|
|
|
profilePictureObjectId: string;
|
2024-12-09 17:03:48 +11:00
|
|
|
};
|
|
|
|
|
|
2026-02-06 23:24:14 +11:00
|
|
|
type UmuState = "Installed" | "NotInstalled" | "NotNeeded";
|
|
|
|
|
|
2024-10-09 16:52:24 +11:00
|
|
|
export type AppState = {
|
|
|
|
|
status: AppStatus;
|
2026-02-06 23:24:14 +11:00
|
|
|
umuState: UmuState;
|
2024-10-09 16:52:24 +11:00
|
|
|
user?: User;
|
|
|
|
|
};
|
|
|
|
|
|
2024-12-09 17:03:48 +11:00
|
|
|
export type Game = {
|
|
|
|
|
id: string;
|
2026-01-20 00:40:48 +00:00
|
|
|
type: "Game" | "Executor" | "Redist";
|
2024-12-09 17:03:48 +11:00
|
|
|
mName: string;
|
|
|
|
|
mShortDescription: string;
|
|
|
|
|
mDescription: string;
|
2025-05-10 15:25:40 +10:00
|
|
|
mIconObjectId: string;
|
|
|
|
|
mBannerObjectId: string;
|
|
|
|
|
mCoverObjectId: string;
|
|
|
|
|
mImageLibraryObjectIds: string[];
|
|
|
|
|
mImageCarouselObjectIds: string[];
|
2024-12-09 17:03:48 +11:00
|
|
|
};
|
|
|
|
|
|
2025-09-07 15:57:06 +10:00
|
|
|
export type Collection = {
|
|
|
|
|
id: string;
|
|
|
|
|
name: string;
|
|
|
|
|
isDefault: boolean;
|
2026-01-20 00:40:48 +00:00
|
|
|
isTools?: boolean;
|
2025-09-07 15:57:06 +10:00
|
|
|
entries: Array<{ gameId: string; game: Game }>;
|
|
|
|
|
};
|
|
|
|
|
|
2025-04-27 21:07:39 +10:00
|
|
|
export type GameVersion = {
|
2026-02-06 23:24:14 +11:00
|
|
|
userConfiguration: {
|
|
|
|
|
launchTemplate: string;
|
|
|
|
|
overrideProtonPath: string;
|
2026-06-21 15:24:33 +10:00
|
|
|
overrideHandler: string | undefined;
|
2026-02-25 23:27:30 +11:00
|
|
|
enableUpdates: boolean
|
2026-02-06 23:24:14 +11:00
|
|
|
};
|
|
|
|
|
setups: Array<{ platform: string }>;
|
|
|
|
|
launches: Array<{ platform: string }>;
|
2025-04-27 21:07:39 +10:00
|
|
|
};
|
|
|
|
|
|
2024-10-08 13:17:06 +11:00
|
|
|
export enum AppStatus {
|
2024-10-09 16:52:24 +11:00
|
|
|
NotConfigured = "NotConfigured",
|
2025-01-30 12:11:20 +11:00
|
|
|
Offline = "Offline",
|
2024-10-09 16:52:24 +11:00
|
|
|
SignedOut = "SignedOut",
|
|
|
|
|
SignedIn = "SignedIn",
|
|
|
|
|
SignedInNeedsReauth = "SignedInNeedsReauth",
|
2024-11-03 16:16:26 +11:00
|
|
|
ServerUnavailable = "ServerUnavailable",
|
2024-10-17 21:05:25 +11:00
|
|
|
}
|
|
|
|
|
|
2026-02-25 23:27:30 +11:00
|
|
|
export type EmptyGameStatusEnum =
|
|
|
|
|
| "Remote"
|
|
|
|
|
| "Queued"
|
|
|
|
|
| "Downloading"
|
|
|
|
|
| "Validating"
|
|
|
|
|
| "Updating"
|
|
|
|
|
| "Uninstalling"
|
|
|
|
|
| "Running";
|
|
|
|
|
|
|
|
|
|
export enum InstalledType {
|
Process manager templating & game importing (#96)
* feat: add new template options, asahi support, and refactoring
* feat: install dir scanning, validation fixes, progress fixes, download manager refactor
This kind of ballooned out of scope, but I implemented some much
needed fixes for the download manager.
First off, I cleanup the Downloadable trait, there was some
duplication of function.
Second, I refactored the "validate" into the GameDownloadAgent,
which calls a 'validate_chunk_logic' yada, same structure as
downloading.
Third, I fixed the progress and validation issues.
Fourth, I added game scanning
* feat: out of box support for Asahi Linux
* fix: clippy
* fix: don't break database
2025-08-02 20:17:27 +10:00
|
|
|
PartiallyInstalled = "PartiallyInstalled",
|
2026-02-25 23:27:30 +11:00
|
|
|
SetupRequired = "SetupRequired",
|
|
|
|
|
Installed = "Installed",
|
2024-10-17 21:05:25 +11:00
|
|
|
}
|
2024-12-07 11:00:35 +11:00
|
|
|
|
2026-02-25 23:27:30 +11:00
|
|
|
export interface InstalledGameStatusData {
|
|
|
|
|
install_type: { type: InstalledType };
|
|
|
|
|
version_id: string;
|
|
|
|
|
install_dir: string;
|
|
|
|
|
update_available: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type GameStatus =
|
|
|
|
|
| {
|
|
|
|
|
type: EmptyGameStatusEnum;
|
|
|
|
|
}
|
|
|
|
|
| ({
|
|
|
|
|
type: "Installed";
|
|
|
|
|
} & InstalledGameStatusData);
|
|
|
|
|
|
|
|
|
|
export type GameStatusEnum = GameStatus["type"];
|
|
|
|
|
|
|
|
|
|
export type RawGameStatus = [GameStatus | null, GameStatus | null];
|
2025-01-04 15:47:14 +11:00
|
|
|
|
|
|
|
|
export enum DownloadableType {
|
|
|
|
|
Game = "Game",
|
|
|
|
|
Tool = "Tool",
|
|
|
|
|
DLC = "DLC",
|
2025-04-27 21:07:39 +10:00
|
|
|
Mod = "Mod",
|
2025-01-04 15:47:14 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type DownloadableMetadata = {
|
2025-04-27 21:07:39 +10:00
|
|
|
id: string;
|
|
|
|
|
version: string;
|
|
|
|
|
downloadType: DownloadableType;
|
|
|
|
|
};
|
2025-01-19 19:14:52 +11:00
|
|
|
|
|
|
|
|
export type Settings = {
|
2025-04-27 21:07:39 +10:00
|
|
|
autostart: boolean;
|
|
|
|
|
maxDownloadThreads: number;
|
|
|
|
|
forceOffline: boolean;
|
|
|
|
|
};
|