mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-08 09:49:19 +00:00
15 lines
373 B
TypeScript
15 lines
373 B
TypeScript
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"))
|
|
}
|
|
}
|
|
}
|