import type { Metadata } from "next" import { getTranslations, getMessages, setRequestLocale } from "next-intl/server" import { Link } from "@/i18n/navigation" import Image from "next/image" import { ArrowRight, ExternalLink, HardDrive, Database, Server, MonitorIcon, Github } 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.systemNas.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-nas", images: [ { url: "/vm/system-nas-menu.png", width: 1200, height: 630, alt: t("ogImageAlt"), }, ], }, } } type NASCard = { name: string tagline: string icon: string base: string fileSystem: string href: string flow: "loader" | "auto-iso" | "dedicated" external?: boolean } type RelatedItem = { href: string; label: string; tail?: string } const ICONS: Record> = { HardDrive, Database, Server, MonitorIcon, } const FLOW_CLS: Record = { loader: "bg-purple-100 text-purple-800 border-purple-200", "auto-iso": "bg-blue-100 text-blue-800 border-blue-200", dedicated: "bg-indigo-100 text-indigo-800 border-indigo-200", } export default async function SystemNASPage({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "docs.createVm.systemNas" }) const messages = (await getMessages({ locale })) as unknown as { docs: { createVm: { systemNas: { supported: { cards: NASCard[] } related: { items: RelatedItem[] } } } } } const cards = messages.docs.createVm.systemNas.supported.cards const relatedItems = messages.docs.createVm.systemNas.related.items const strong = (chunks: React.ReactNode) => {chunks} const umbrelLink = (chunks: React.ReactNode) => ( {chunks} ) return (
{t("intro.body")}
{t("image.alt")}
{t("image.caption")}

{t("supported.heading")}

{cards.map((card) => { const Icon = ICONS[card.icon] || HardDrive const flowLabel = t(`flowBadges.${card.flow}`) const cls = "group block rounded-lg border border-gray-200 bg-white p-5 transition-all hover:border-blue-300 hover:shadow-md" const inner = (

{card.name}

{card.tagline}

{flowLabel}
{t("labels.base")}
{card.base}
{t("labels.fileSystem")}
{card.fileSystem}
{t("labels.viewDetails")} {card.external ? ( ) : ( )}
) return card.external ? ( {inner} ) : ( {inner} ) })}
{t.rich("umbrel.bodyRich", { strong, umbrelLink })} {t.rich("zfsMem.bodyRich", { strong })}

{t("related.heading")}

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