backend: detect updates from Docker Hub + add a Check for updates button

GET /api/version now reads the latest version from Docker Hub image tags (the
actual update channel clinics pull), falling back to the GitHub release if
Docker Hub is unreachable, with a shorter 1h cache and a `?refresh=1` bypass.
Settings → About & updates gains a "Check for updates" button that forces a
fresh, cache-bypassing lookup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Khalid Abdi
2026-06-29 21:00:18 +03:00
parent dc5f55f87d
commit 2bb03633ff
3 changed files with 95 additions and 21 deletions
+2 -2
View File
@@ -14,8 +14,8 @@ export type NetworkInfo = {
urls: string[];
};
export function getVersionInfo(): Promise<VersionInfo> {
return apiFetch<VersionInfo>("/api/version");
export function getVersionInfo(force = false): Promise<VersionInfo> {
return apiFetch<VersionInfo>(`/api/version${force ? "?refresh=1" : ""}`);
}
export function getNetworkInfo(): Promise<NetworkInfo> {