mirror of
https://github.com/temetro/temetro.git
synced 2026-08-30 12:19:07 +00:00
frontend: runtime backend URL (LAN), voice dictation, version + update UI
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>
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
// Thin fetch wrapper for the temetro backend's non-auth API (patients, …).
|
||||
// Auth itself goes through the Better Auth client (lib/auth-client.ts).
|
||||
|
||||
export const API_BASE_URL =
|
||||
process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:4000";
|
||||
import { resolveBackendUrl } from "@/lib/backend-url";
|
||||
|
||||
// Derived from the current host in the browser (see lib/backend-url.ts), so the
|
||||
// app works over localhost and the clinic LAN without a per-deployment rebuild.
|
||||
export const API_BASE_URL = resolveBackendUrl();
|
||||
|
||||
export class ApiError extends Error {
|
||||
constructor(
|
||||
|
||||
Reference in New Issue
Block a user