Files
ProxMenux/web/app/[locale]/docs/post-install/security/page.tsx
T
MacRimi fcfe8da765 refine post-install and hardware GPU docs, Monitor UX and CLI styling
- rewrite the 15 post-install pages and the 3 hardware GPU pages so they reflect the current scripts (reversibility, tracked-tool counts, kernel parameters, per-tool commands, Alpine LXC propagation flow)
- migrate the legacy step-badge helper on post-install/optional and create-vm/synology to the canonical pill component, with the stepLabel key added in each locale
- fix rich-text i18n calls missing helpers across network, automated, optional, security, customization and the post-install landing pages, and escape the `<iface>` placeholder in automated so intl no longer parses it as a tag
- remove the mouse-follow blue overlay from the docs landing layout
- reposition the App-tab Edit button and stack the Search and Register controls vertically on mobile
- move the Bulk update Configure/Edit control into the section header so it behaves the same on desktop and mobile
- show a spinner during the final autoremove/autoclean pass of update-pve-safe so the cleanup step reads as active instead of silent
- restyle the shell spinner and msg_info in a distinctive purple and drop the unused msg_lang duplicate
- add a web-docs i18n build script and its CI workflow, plus tests for the pushover notification channel
2026-08-26 17:23:09 +02:00

111 lines
3.9 KiB
TypeScript

import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Link } from "@/i18n/navigation"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
import CopyableCode from "@/components/CopyableCode"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.postInstall.security.meta" })
return { title: t("title"), description: t("description") }
}
type RelatedItem = { label: string; href: string; tail: string }
export default async function PostInstallSecurityPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.postInstall.security" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { postInstall: { security: {
rpcbind: { whyItems: string[] }
related: { items: RelatedItem[] }
} } }
}
const whyItems = messages.docs.postInstall.security.rpcbind.whyItems
const relatedItems = messages.docs.postInstall.security.related.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const uninstallLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/uninstall" className="text-blue-700 hover:underline">{chunks}</Link>
)
return (
<div>
<DocHeader
title={t("header.title")}
section={t("header.section")}
estimatedMinutes={5}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { strong, em })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("rpcbind.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("rpcbind.intro", { code, strong })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("rpcbind.whyTitle")}</h3>
<ul className="list-disc pl-6 space-y-1 text-gray-800 mb-4">
{whyItems.map((_, idx) => (
<li key={idx}>{t.rich(`rpcbind.whyItems.${idx}`, { code })}</li>
))}
</ul>
<Callout variant="warning" title={t("rpcbind.nfsTitle")}>
{t.rich("rpcbind.nfsBody", { strong, em, code })}
</Callout>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("rpcbind.runsTitle")}</h3>
<CopyableCode
code={`# Stop and disable both activation paths
systemctl disable --now rpcbind.socket rpcbind.service`}
className="my-4"
/>
<p className="mb-4 text-gray-800 leading-relaxed">{t("rpcbind.runsOutro")}</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("rpcbind.verifyTitle")}</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("rpcbind.verifyBody", { code })}
</p>
<CopyableCode
code={`systemctl is-active rpcbind.service rpcbind.socket
systemctl is-enabled rpcbind.service rpcbind.socket
ss -tulpn | grep ':111 ' # should return nothing`}
className="my-4"
/>
<Callout variant="warning" title={t("rpcbind.reversibleTitle")}>
{t.rich("rpcbind.reversibleBody", { em, strong, code, link: uninstallLink })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tail}
</li>
))}
</ul>
</div>
)
}