drop-app-kt/types.ts

81 lines
1.4 KiB
TypeScript
Raw Permalink Normal View History

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>;
};
export type User = {
id: string;
username: string;
admin: boolean;
displayName: string;
profilePicture: string;
};
export type AppState = {
status: AppStatus;
user?: User;
};
export type Game = {
id: string;
mName: string;
mShortDescription: string;
mDescription: string;
mIconId: string;
mBannerId: string;
mCoverId: string;
mImageLibrary: string[];
};
2024-10-08 13:17:06 +11:00
export enum AppStatus {
NotConfigured = "NotConfigured",
Offline = "Offline",
SignedOut = "SignedOut",
SignedIn = "SignedIn",
SignedInNeedsReauth = "SignedInNeedsReauth",
ServerUnavailable = "ServerUnavailable",
2024-10-17 21:05:25 +11:00
}
export enum GameStatusEnum {
2024-10-17 21:05:25 +11:00
Remote = "Remote",
Queued = "Queued",
2024-10-17 21:05:25 +11:00
Downloading = "Downloading",
Installed = "Installed",
Updating = "Updating",
Uninstalling = "Uninstalling",
SetupRequired = "SetupRequired",
Running = "Running"
2024-10-17 21:05:25 +11:00
}
export type GameStatus = {
type: GameStatusEnum;
version_name?: string;
};
export enum DownloadableType {
Game = "Game",
Tool = "Tool",
DLC = "DLC",
Mod = "Mod"
}
export type DownloadableMetadata = {
id: string,
version: string,
downloadType: DownloadableType
}
export type Settings = {
autostart: boolean,
maxDownloadThreads: number,
forceOffline: boolean
}