diff options
| author | 2026-01-16 20:20:05 +0800 | |
|---|---|---|
| committer | 2026-01-16 20:20:05 +0800 | |
| commit | 3c13c14dea03c6b91716fb0f1578deb12fcf9756 (patch) | |
| tree | 840174337f765bfcac6c173ddd629c6e3bf6f6b1 /ui/src/types | |
| parent | 1119f6c3cf421da2f2db92873efae8135c76b678 (diff) | |
| download | DropOut-3c13c14dea03c6b91716fb0f1578deb12fcf9756.tar.gz DropOut-3c13c14dea03c6b91716fb0f1578deb12fcf9756.zip | |
feat: implement instance management functionality
Added a new InstancesState class to manage game instances, including loading, creating, deleting, updating, and duplicating instances. Integrated instance selection into the game launch process, ensuring an active instance is selected before starting a game. Updated the types to include instance-related data structures.
Diffstat (limited to 'ui/src/types')
| -rw-r--r-- | ui/src/types/index.ts | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/ui/src/types/index.ts b/ui/src/types/index.ts index 9a4da2b..a5b336e 100644 --- a/ui/src/types/index.ts +++ b/ui/src/types/index.ts @@ -1,4 +1,4 @@ -export type ViewType = "home" | "versions" | "settings" | "guide"; +export type ViewType = "home" | "versions" | "settings" | "guide" | "instances"; export interface Version { id: string; @@ -187,3 +187,18 @@ export interface InstalledForgeVersion { // ==================== Mod Loader Type ==================== export type ModLoaderType = "vanilla" | "fabric" | "forge"; + +// ==================== Instance Types ==================== + +export interface Instance { + id: string; + name: string; + game_dir: string; + version_id?: string; + created_at: number; + last_played?: number; + icon_path?: string; + notes?: string; + mod_loader?: string; + mod_loader_version?: string; +} |