aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/packages/ui-new/src/stores/settings-store.ts
diff options
context:
space:
mode:
author苏向夜 <fu050409@163.com>2026-02-25 00:16:53 +0800
committer苏向夜 <fu050409@163.com>2026-02-25 00:16:53 +0800
commita6773bd092db654360c599ca6b0108ea0e456e8c (patch)
treec78c802a2563fff7aef908532a0706c0299830ac /packages/ui-new/src/stores/settings-store.ts
parentb275a3668b140d9ce4663de646519d2dbd4297e7 (diff)
downloadDropOut-a6773bd092db654360c599ca6b0108ea0e456e8c.tar.gz
DropOut-a6773bd092db654360c599ca6b0108ea0e456e8c.zip
feat: prepare for nightly alpha
Diffstat (limited to 'packages/ui-new/src/stores/settings-store.ts')
-rw-r--r--packages/ui-new/src/stores/settings-store.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/ui-new/src/stores/settings-store.ts b/packages/ui-new/src/stores/settings-store.ts
index 52da7fd..0bfc1e1 100644
--- a/packages/ui-new/src/stores/settings-store.ts
+++ b/packages/ui-new/src/stores/settings-store.ts
@@ -2,6 +2,7 @@ import { convertFileSrc, invoke } from "@tauri-apps/api/core";
import { listen, type UnlistenFn } from "@tauri-apps/api/event";
import { toast } from "sonner";
import { create } from "zustand";
+import { downloadAdoptiumJava } from "@/client";
import type { ModelInfo } from "../types/bindings/assistant";
import type { LauncherConfig } from "../types/bindings/config";
import type {
@@ -10,7 +11,6 @@ import type {
} from "../types/bindings/downloader";
import type {
JavaCatalog,
- JavaDownloadInfo,
JavaInstallation,
JavaReleaseInfo,
} from "../types/bindings/java";
@@ -445,13 +445,13 @@ export const useSettingsStore = create<SettingsState>((set, get) => ({
if (!selectedMajorVersion) return;
set({ isDownloadingJava: true, javaDownloadStatus: "Starting..." });
try {
- const result = await invoke<JavaDownloadInfo>("download_java", {
- majorVersion: selectedMajorVersion,
- imageType: selectedImageType,
- source: selectedDownloadSource,
- });
+ const result = await downloadAdoptiumJava(
+ selectedMajorVersion,
+ selectedImageType,
+ selectedDownloadSource,
+ );
set({
- javaDownloadStatus: `Java ${selectedMajorVersion} download started: ${result.fileName}`,
+ javaDownloadStatus: `Java ${selectedMajorVersion} download started: ${result.path}`,
});
toast.success("Download started");
} catch (e) {