From 43a3e9c285f3d5d04fef025041a06609a0d1c218 Mon Sep 17 00:00:00 2001
From: "Begonia, HE" <163421589+BegoniaHe@users.noreply.github.com>
Date: Thu, 15 Jan 2026 05:29:58 +0100
Subject: feat(java): Implement Java catalog management and download features

- Added commands to fetch and refresh the Java catalog, cancel downloads, and manage pending downloads.
- Enhanced the Java download modal in the UI to support version selection, download progress, and pending downloads.
- Introduced new types for Java catalog, download progress, and pending downloads.
- Updated settings store to handle Java catalog state, download progress, and pending downloads.
- Improved user experience with loading states, error handling, and status notifications for Java installations.
---
 ui/src/App.svelte | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

(limited to 'ui/src/App.svelte')

diff --git a/ui/src/App.svelte b/ui/src/App.svelte
index 968f6c5..f32a42f 100644
--- a/ui/src/App.svelte
+++ b/ui/src/App.svelte
@@ -1,25 +1,23 @@
 <script lang="ts">
   import { getVersion } from "@tauri-apps/api/app";
-  import { onMount, onDestroy } from "svelte";
   import { convertFileSrc } from "@tauri-apps/api/core";
+  import { onDestroy, onMount } from "svelte";
   import DownloadMonitor from "./lib/DownloadMonitor.svelte";
   import GameConsole from "./lib/GameConsole.svelte";
-  
-  // Components
-  import Sidebar from "./components/Sidebar.svelte";
-  import HomeView from "./components/HomeView.svelte";
-  import VersionsView from "./components/VersionsView.svelte";
-  import SettingsView from "./components/SettingsView.svelte";
+// Components
   import BottomBar from "./components/BottomBar.svelte";
+  import HomeView from "./components/HomeView.svelte";
   import LoginModal from "./components/LoginModal.svelte";
-  import StatusToast from "./components/StatusToast.svelte";
   import ParticleBackground from "./components/ParticleBackground.svelte";
-
-  // Stores
-  import { uiState } from "./stores/ui.svelte";
+  import SettingsView from "./components/SettingsView.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 { settingsState } from "./stores/settings.svelte";
   import { gameState } from "./stores/game.svelte";
+  import { settingsState } from "./stores/settings.svelte";
+  import { uiState } from "./stores/ui.svelte";
 
   let mouseX = $state(0);
   let mouseY = $state(0);
@@ -32,6 +30,7 @@
   onMount(async () => {
     authState.checkAccount();
     await settingsState.loadSettings();
+    await settingsState.detectJava();
     gameState.loadVersions();
     getVersion().then((v) => (uiState.appVersion = v));
     window.addEventListener("mousemove", handleMouseMove);
-- 
cgit v1.2.3-70-g09d2

