diff options
| author | 2026-01-16 20:20:19 +0800 | |
|---|---|---|
| committer | 2026-01-16 20:20:19 +0800 | |
| commit | 743401f15199a116b1777bced843c774c5a59fba (patch) | |
| tree | 24c53e8882392b03fa5a65c874c547fbacab791a /ui/src/App.svelte | |
| parent | 3c13c14dea03c6b91716fb0f1578deb12fcf9756 (diff) | |
| download | DropOut-743401f15199a116b1777bced843c774c5a59fba.tar.gz DropOut-743401f15199a116b1777bced843c774c5a59fba.zip | |
feat: add InstancesView component and integrate instance management into the UI
Introduced a new InstancesView component for managing game instances, allowing users to create, edit, delete, and duplicate instances. Updated the App.svelte to include the InstancesView and modified various components to ensure instance selection is handled correctly. Enhanced the ModLoaderSelector and VersionsView to check for active instances before performing actions. Updated the Sidebar to include navigation to the new InstancesView.
Diffstat (limited to 'ui/src/App.svelte')
| -rw-r--r-- | ui/src/App.svelte | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/src/App.svelte b/ui/src/App.svelte index 2b78892..127bbea 100644 --- a/ui/src/App.svelte +++ b/ui/src/App.svelte @@ -11,12 +11,14 @@ import ParticleBackground from "./components/ParticleBackground.svelte"; import SettingsView from "./components/SettingsView.svelte"; import AssistantView from "./components/AssistantView.svelte"; + import InstancesView from "./components/InstancesView.svelte"; import Sidebar from "./components/Sidebar.svelte"; import StatusToast from "./components/StatusToast.svelte"; import VersionsView from "./components/VersionsView.svelte"; // Stores import { authState } from "./stores/auth.svelte"; import { gameState } from "./stores/game.svelte"; + import { instancesState } from "./stores/instances.svelte"; import { settingsState } from "./stores/settings.svelte"; import { uiState } from "./stores/ui.svelte"; import { logsState } from "./stores/logs.svelte"; @@ -40,6 +42,7 @@ await settingsState.loadSettings(); logsState.init(); await settingsState.detectJava(); + await instancesState.loadInstances(); gameState.loadVersions(); getVersion().then((v) => (uiState.appVersion = v)); window.addEventListener("mousemove", handleMouseMove); @@ -113,6 +116,8 @@ <div class="flex-1 relative overflow-hidden"> {#if uiState.currentView === "home"} <HomeView mouseX={mouseX} mouseY={mouseY} /> + {:else if uiState.currentView === "instances"} + <InstancesView /> {:else if uiState.currentView === "versions"} <VersionsView /> {:else if uiState.currentView === "settings"} |