import type { Metadata } from "next" import { getTranslations, getMessages, setRequestLocale } from "next-intl/server" import { Link } from "@/i18n/navigation" import Image from "next/image" import { DocHeader } from "@/components/ui/doc-header" import { Callout } from "@/components/ui/callout" import { Steps } from "@/components/ui/steps" export async function generateMetadata({ params, }: { params: Promise<{ locale: string }> }): Promise { const { locale } = await params const t = await getTranslations({ locale, namespace: "docs.postInstall.updates.meta" }) return { title: t("title"), description: t("description"), alternates: { canonical: "https://proxmenux.com/docs/post-install/updates" }, } } type Step = { title: string; body: string } type DiffRow = { pathLabel: string; pathHref: string | null; scope: string; when: string } export default async function PostInstallUpdatesPage({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "docs.postInstall.updates" }) const messages = (await getMessages({ locale })) as unknown as { docs: { postInstall: { updates: { detection: { steps: Step[] } applying: { steps: Step[] } differs: { rows: DiffRow[] } } } } } const detectionSteps = messages.docs.postInstall.updates.detection.steps const applyingSteps = messages.docs.postInstall.updates.applying.steps const diffRows = messages.docs.postInstall.updates.differs.rows const code = (chunks: React.ReactNode) => {chunks} const strong = (chunks: React.ReactNode) => {chunks} const em = (chunks: React.ReactNode) => {chunks} const optimizationsLink = (chunks: React.ReactNode) => ( {chunks} ) const settingsLink = (chunks: React.ReactNode) => ( {chunks} ) return (
{t.rich("intro.body", { code })}

{t("why.heading")}

{t.rich("why.body", { em })}

{t("detection.heading")}

{detectionSteps.map((step, idx) => (

{t.rich(`detection.steps.${idx}.body`, { code, em })}

))}

{t("pathA.heading")}

{t.rich("pathA.intro", { strong, em })}

{t("pathA.menuAlt")}
{t.rich("pathA.menuCaption", { em })}

{t.rich("pathA.checklistBody", { code })}

{t("pathA.checklistAlt")}
{t("pathA.checklistCaption")}

{t("pathB.heading")}

{t.rich("pathB.intro", { strong, link: optimizationsLink })}

{t("pathB.imageAlt")}
{t("pathB.imageCaption")}

{t("applying.heading")}

{applyingSteps.map((step, idx) => (

{t.rich(`applying.steps.${idx}.body`, { code, strong })}

))}

{t("differs.heading")}

{diffRows.map((row, idx) => ( ))}
{t("differs.headerPath")} {t("differs.headerScope")} {t("differs.headerWhen")}
{row.pathHref ? ( {row.pathLabel} ) : ( {row.pathLabel} )} {t.rich(`differs.rows.${idx}.scope`, { em })} {row.when}
{t.rich("notifBody", { em, link: settingsLink })}
) }