feat(updates): add AtomGit update download source

This commit is contained in:
t8y2 committed 2026-07-03 11:01:27 +08:00
1 parent cb42a4184a
commit 6f2e4774f4
14 files changed
+75 -18

No files matched your search

@@ -16,6 +16,7 @@ export function canDownloadAndInstallUpdate(info: api.UpdateInfo | null, isDeskt
}
export function normalizeUpdateDownloadSource(value: unknown): SettingsUpdateDownloadSource {
if (value === "atomgit") return "atomgit";
return value === "cnb" ? "cnb" : "official";
}
@@ -29,6 +30,9 @@ export function resolveUpdateReleaseUrl(info: api.UpdateInfo | null, source: unk
if (normalizedSource === "cnb" && info?.latest_version) {
return `https://cnb.cool/dbxio.com/dbx/-/releases/tag/${tagVersion(info.latest_version)}`;
}
if (normalizedSource === "atomgit" && info?.latest_version) {
return `https://atomgit.com/t8y2/dbx/releases/${tagVersion(info.latest_version)}`;
}
return info?.release_url || fallbackUrl;
}