mirror of
https://github.com/temetro/temetro.git
synced 2026-07-27 12:18:56 +00:00
403e0e38e9
Resolve the backend URL from the current host at runtime (lib/backend-url.ts) so one build works on localhost and any clinic LAN IP without a rebuild; used by the API client, auth client, and socket. Wire the AI-chat mic to the Web Speech API with graceful fallback. Add a Settings "About & updates" panel (current/latest version, update command, shareable network address) and an optional dismissible update banner. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
24 lines
562 B
TypeScript
24 lines
562 B
TypeScript
// Client helpers for the backend's version + network endpoints (both public).
|
|
import { apiFetch } from "@/lib/api-client";
|
|
|
|
export type VersionInfo = {
|
|
current: string;
|
|
latest: string | null;
|
|
updateAvailable: boolean;
|
|
releaseUrl: string | null;
|
|
};
|
|
|
|
export type NetworkInfo = {
|
|
port: number;
|
|
addresses: string[];
|
|
urls: string[];
|
|
};
|
|
|
|
export function getVersionInfo(): Promise<VersionInfo> {
|
|
return apiFetch<VersionInfo>("/api/version");
|
|
}
|
|
|
|
export function getNetworkInfo(): Promise<NetworkInfo> {
|
|
return apiFetch<NetworkInfo>("/api/network");
|
|
}
|