import { useQuery } from "@tanstack/react-query"; import { Info, Sparkles } from "lucide-react"; import { api } from "../lib/api"; import { FRONTEND_VERSION, FRONTEND_SHA, FRONTEND_BUILD_DATE } from "../lib/version"; import Modal from "./Modal"; function fmtDate(d?: string | null): string { if (!d) return "—"; const t = new Date(d); return isNaN(t.getTime()) ? d : t.toLocaleString(); } // About dialog: app + build + schema versions (frontend/backend/database), plus a // shortcut into the release notes. export default function About({ onClose, onOpenReleaseNotes, }: { onClose: () => void; onOpenReleaseNotes: () => void; }) { const { data } = useQuery({ queryKey: ["version"], queryFn: api.version, staleTime: 5 * 60_000 }); const rows: [string, string][] = [ ["Frontend", FRONTEND_VERSION + (FRONTEND_SHA !== "unknown" ? ` · ${FRONTEND_SHA}` : "")], [ "Backend", data ? data.app_version + (data.git_sha !== "unknown" ? ` · ${data.git_sha}` : "") : "…", ], ["Database", data?.db_revision ?? "…"], ["Build date", fmtDate(data?.build_date ?? FRONTEND_BUILD_DATE)], ]; return ( About } onClose={onClose} >
Siftlode
v{FRONTEND_VERSION}

Self-hosted, multi-user reader for your own YouTube subscriptions.

{rows.map(([k, v], i) => (
{k} {v}
))}
); }