Skip to content

Commit bc475e0

Browse files
committed
refactor(ui): invoke the stable update directly
Remove the dedicated stable-update wrapper and invoke the Tauri WinGet command directly from the official release notification. Non-Tauri and remote windows retain the existing release link behavior through the toast fallback. Validated with the UI TypeScript check and Cargo check.
1 parent ae8d5ec commit bc475e0

2 files changed

Lines changed: 3 additions & 21 deletions

File tree

packages/ui/src/lib/native/stable-update.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

packages/ui/src/stores/releases.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { createEffect, createSignal } from "solid-js"
2+
import { invoke } from "@tauri-apps/api/core"
23
import type { ServerMeta, SupportMeta } from "../../../server/src/api-types"
34
import { getServerMeta } from "../lib/server-meta"
45
import { showToastNotification, ToastHandle } from "../lib/notifications"
56
import { getLogger } from "../lib/logger"
67
import { tGlobal } from "../lib/i18n"
7-
import { installStableUpdate } from "../lib/native/stable-update"
8+
import { isLocalWindow, isTauriHost } from "../lib/runtime-env"
89
import { hasInstances, showFolderSelection } from "./ui"
910

1011
const log = getLogger("actions")
@@ -62,7 +63,7 @@ function ensureVisibilityEffect() {
6263
? {
6364
label: tGlobal("releases.upgradeRequired.action.getUpdate"),
6465
href: support.latestServerUrl,
65-
onClick: () => installStableUpdate(support.latestServerUrl!),
66+
onClick: isTauriHost() && isLocalWindow() ? () => invoke("install_stable_update") : undefined,
6667
}
6768
: undefined,
6869
})

0 commit comments

Comments
 (0)