import type { Metadata } from "next" import { getTranslations, getMessages, setRequestLocale } from "next-intl/server" import { Link } from "@/i18n/navigation" import Image from "next/image" import { ExternalLink, Server } from "lucide-react" import { DocHeader } from "@/components/ui/doc-header" import { Callout } from "@/components/ui/callout" export async function generateMetadata({ params, }: { params: Promise<{ locale: string }> }): Promise { const { locale } = await params const t = await getTranslations({ locale, namespace: "docs.createVm.systemWindows.meta" }) return { title: t("title"), description: t("description"), openGraph: { title: t("ogTitle"), description: t("ogDescription"), type: "article", url: "https://macrimi.github.io/ProxMenux/docs/create-vm/system-windows", images: [ { url: "/vm/menu_windows.png", width: 1200, height: 630, alt: t("ogImageAlt"), }, ], }, } } type ConfigRow = { param: string; value?: string; valueRich?: string; options?: string; optionsRich?: string } type StringItem = string type VirtioStep = { title: string; body?: string; bodyRich?: string; img: string; caption: string } type RelatedItem = { href: string; label: string; tail?: string } export default async function SystemWindowsPage({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "docs.createVm.systemWindows" }) const messages = (await getMessages({ locale })) as unknown as { docs: { createVm: { systemWindows: { config: { defaultRows: ConfigRow[]; advancedRows: ConfigRow[] } storagePlan: { virtualDiskItems: StringItem[]; importDiskItems: StringItem[]; pciItems: StringItem[] } installOptions: { uupItems: StringItem[] } endToEnd: { items: StringItem[] } virtio: { steps: VirtioStep[] } related: { items: RelatedItem[] } } } } } const defaultRows = messages.docs.createVm.systemWindows.config.defaultRows const advancedRows = messages.docs.createVm.systemWindows.config.advancedRows const virtualDiskItems = messages.docs.createVm.systemWindows.storagePlan.virtualDiskItems const importDiskItems = messages.docs.createVm.systemWindows.storagePlan.importDiskItems const pciItems = messages.docs.createVm.systemWindows.storagePlan.pciItems const uupItems = messages.docs.createVm.systemWindows.installOptions.uupItems const endToEndItems = messages.docs.createVm.systemWindows.endToEnd.items const virtioSteps = messages.docs.createVm.systemWindows.virtio.steps const relatedItems = messages.docs.createVm.systemWindows.related.items const code = (chunks: React.ReactNode) => {chunks} const strong = (chunks: React.ReactNode) => {chunks} const em = (chunks: React.ReactNode) => {chunks} const gpuLink = (chunks: React.ReactNode) => ( {chunks} ) return (
{t.rich("intro.body", { code })}
{t("image.alt")}
{t("image.caption")}

{t("config.heading")}

{t("config.intro")}

{t("config.defaultHeading")}

{defaultRows.map((row, idx) => ( ))}
{t("config.headerParam")} {t("config.headerValue")}
{row.param} {row.valueRich ? t.rich(`config.defaultRows.${idx}.valueRich`, { code }) : row.value}

{t("config.advancedHeading")}

{t("config.advancedIntro")}

{advancedRows.map((row, idx) => ( ))}
{t("config.headerParam")} {t("config.headerOptions")}
{row.param} {row.optionsRich ? t.rich(`config.advancedRows.${idx}.optionsRich`, { code }) : row.options}
{t("config.tpmWarnBody")}

{t("storagePlan.heading")}

{t.rich("storagePlan.body", { strong })}

{t("storagePlan.virtualDiskTitle")}

    {virtualDiskItems.map((_, idx) => (
  • {t.rich(`storagePlan.virtualDiskItems.${idx}`, { code })}
  • ))}

{t("storagePlan.importDiskTitle")}

    {importDiskItems.map((_, idx) => (
  • {t.rich(`storagePlan.importDiskItems.${idx}`, { code })}
  • ))}

{t("storagePlan.pciTitle")}

    {pciItems.map((_, idx) => (
  • {t.rich(`storagePlan.pciItems.${idx}`, { em, code })}
  • ))}
{t.rich("storagePlan.resetBody", { strong })}

{t("gpu.heading")}

{t.rich("gpu.body", { gpuLink })}

{t("autoFeatures.heading")}

{t("autoFeatures.efiTitle")}

{t("autoFeatures.efiBody")}

{t("autoFeatures.tpmTitle")}

{t("autoFeatures.tpmBody")}

{t("autoFeatures.isoTitle")}

{t.rich("autoFeatures.isoBody", { code, em })}

{t("autoFeatures.guestTitle")}

{t.rich("autoFeatures.guestBody", { code })}

{t("installOptions.heading")}

{t("installOptions.intro")}

{t("installOptions.uupLogoAlt")}

{t("installOptions.uupTitle")}

{t.rich("installOptions.uupBody", { strong })}

    {uupItems.map((_, idx) => (
  • {t(`installOptions.uupItems.${idx}`)}
  • ))}
{t("installOptions.uupLearnMore")}

{t("installOptions.localTitle")}

{t.rich("installOptions.localBody", { code })}

{t("installOptions.localImageAlt")}

{t("installOptions.localImageCaption")}

{t("endToEnd.heading")}

    {endToEndItems.map((_, idx) => (
  1. {t.rich(`endToEnd.items.${idx}`, { code })}
  2. ))}

{t("virtio.heading")}

{t.rich("virtio.body", { code })}

{t.rich("virtio.warnBody", { code })} {virtioSteps.map((step, idx) => (
{t("virtio.stepLabel")} {idx + 1}

{step.title}

{step.bodyRich ? t.rich(`virtio.steps.${idx}.bodyRich`, { strong, code }) : step.body}

{step.caption}
{step.caption}
))} {t.rich("virtio.tipBody", { code })}

{t("related.heading")}

    {relatedItems.map((item) => (
  • {item.label} {item.tail}
  • ))}
) }