import { useTranslation } from "react-i18next"; import { Bug, Sparkles } from "lucide-react"; import { RELEASE_NOTES } from "../lib/releaseNotes"; import Modal from "./Modal"; function fmtDate(d: string): string { const t = new Date(d); return isNaN(t.getTime()) ? d : t.toLocaleDateString(undefined, { year: "numeric", month: "short", day: "numeric" }); } // Public release notes (chores are intentionally omitted here). `highlight` rings the // version the user just updated to when opened from the new-version banner. export default function ReleaseNotes({ onClose, highlight, }: { onClose: () => void; highlight?: string; }) { const { t } = useTranslation(); return (
{RELEASE_NOTES.map((r) => (

v{r.version}

{fmtDate(r.date)} {r.sha && ( {r.sha} )}
{r.summary &&

{r.summary}

} {r.features?.length ? (
{t("about.new")}
    {r.features.map((f, i) => (
  • {f}
  • ))}
) : null} {r.fixes?.length ? (
{t("about.fixes")}
    {r.fixes.map((f, i) => (
  • {f}
  • ))}
) : null}
))}
); }