From 3c13c14dea03c6b91716fb0f1578deb12fcf9756 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 20:20:05 +0800 Subject: 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. --- ui/src/types/index.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'ui/src/types') 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; +} -- cgit v1.2.3-70-g09d2