Site: show downloads across every release [skip ci]

/release.json adds the sum of every release asset's downloads; the
update manifests are the apps' checks, not downloads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-13 13:43:38 -04:00
1 parent 87c42fde0e
commit 854c360ea1
7 files changed
+81 -26

No files matched your search

+5 -4
View File
@@ -1,10 +1,11 @@
// Gitea redirects this to the newest release.
export const RELEASES = "https://git.zacharyzhang.com/ZacharyZhang-NY/ElyOffice/releases/latest";
/** The newest release's version, from the worker. */
export async function latest(): Promise<string> {
export type Release = { version: string; downloads: number };
/** The newest release and all downloads, from the worker. */
export async function latest(): Promise<Release> {
const res = await fetch("/release.json");
if (!res.ok) throw new Error(`release.json: ${res.status} ${await res.text()}`);
const { version } = (await res.json()) as { version: string };
return version;
return (await res.json()) as Release;
}