desktop: add electron version (#15663)

This commit is contained in:
Brendan Allan
2026-03-04 15:12:34 +08:00
committed by GitHub
parent e4f0825c56
commit 5cf235fa6c
223 changed files with 4293 additions and 47 deletions

View File

@@ -0,0 +1,14 @@
import { initI18n, t } from "./i18n"
export const UPDATER_ENABLED = window.__OPENCODE__?.updaterEnabled ?? false
export async function runUpdater({ alertOnFail }: { alertOnFail: boolean }) {
await initI18n()
try {
await window.api.runUpdater(alertOnFail)
} catch {
if (alertOnFail) {
window.alert(t("desktop.updater.checkFailed.message"))
}
}
}