mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-06-14 20:36:59 +00:00
complete i18n migration to /[locale]/ with EN+ES content
Full rewrite of the docs site under app/[locale]/ with next-intl in localePrefix:"always" mode. Every page now exists at both /en/<path> and /es/<path>; the root / shows a meta-refresh + JS redirect to /<defaultLocale>/ so GitHub Pages serves something on the apex URL. Highlights: - 107 doc pages migrated to file-per-page JSON namespaces under messages/en/ and messages/es/. Spanish content is fully translated (no copy-of-English placeholders). - New documentation for the Active Suppressions section in the Settings tab and the per-event Dismiss dropdown in the Health Monitor modal. - New screenshots: dismiss-duration-dropdown.png and an updated health-suppression-settings.png. - Pagefind integrated for client-side search; index is built on every CI deploy (not committed). - RSS feeds: per-locale at /<locale>/rss.xml plus root /rss.xml for backward compat. - Removed the dead app/[locale]/guides/[slug]/ route — every guide now has its own static page and no markdown source remains. - Fixed orphan link /guides/nvidia -> /guides/nvidia-manual in docs/hardware/nvidia-host. - Removed obsolete components (footer2, calendar, drawer). Verified locally with `npm ci && npm run build`: 2804 files in out/, 231 pages indexed by pagefind, root redirect intact, both locale roots and the new Active Suppressions docs render OK.
This commit is contained in:
191
web/app/[locale]/docs/settings/beta-program/page.tsx
Normal file
191
web/app/[locale]/docs/settings/beta-program/page.tsx
Normal file
@@ -0,0 +1,191 @@
|
||||
import type { Metadata } from "next"
|
||||
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
|
||||
import { Link } from "@/i18n/navigation"
|
||||
import { ExternalLink } 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<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.settings.betaProgram.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://macrimi.github.io/ProxMenux/docs/settings/beta-program",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type StringItem = string
|
||||
type RelatedItem = { href: string; label: string; tail?: string }
|
||||
|
||||
export default async function BetaProgramPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.settings.betaProgram" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { settings: { betaProgram: {
|
||||
why: { items: StringItem[] }
|
||||
dialog: { options: StringItem[]; directions: StringItem[] }
|
||||
confirm: { items: StringItem[] }
|
||||
switching: { items: StringItem[] }
|
||||
feedback: { items: StringItem[] }
|
||||
related: { items: RelatedItem[] }
|
||||
} } }
|
||||
}
|
||||
const block = messages.docs.settings.betaProgram
|
||||
const whyItems = block.why.items
|
||||
const dialogOptions = block.dialog.options
|
||||
const dialogDirections = block.dialog.directions
|
||||
const confirmItems = block.confirm.items
|
||||
const switchingItems = block.switching.items
|
||||
const feedbackItems = block.feedback.items
|
||||
const relatedItems = block.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 ul = (chunks: React.ReactNode) => <ul className="list-disc pl-6 mt-1">{chunks}</ul>
|
||||
const li = (chunks: React.ReactNode) => <li>{chunks}</li>
|
||||
const link = (chunks: React.ReactNode) => (
|
||||
<Link href="/docs/settings/show-version-information" className="text-blue-600 hover:underline">
|
||||
{chunks}
|
||||
</Link>
|
||||
)
|
||||
const ghlink = (chunks: React.ReactNode) => (
|
||||
<a
|
||||
href="https://github.com/MacRimi/ProxMenux/issues"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-blue-600 hover:underline inline-flex items-center gap-1"
|
||||
>
|
||||
{chunks}
|
||||
<ExternalLink className="w-3 h-3" />
|
||||
</a>
|
||||
)
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={3}
|
||||
scriptPath="menus/config_menu.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="info" title={t("intro.title")}>
|
||||
{t.rich("intro.body", { code, strong })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("why.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("why.intro")}</p>
|
||||
<ul className="list-disc pl-6 mb-4 text-gray-800 leading-relaxed space-y-1">
|
||||
{whyItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`why.items.${idx}`, { code, strong })}</li>
|
||||
))}
|
||||
</ul>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">{t.rich("why.outro", { code })}</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("dialog.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("dialog.intro", { strong })}</p>
|
||||
<ul className="list-disc pl-6 mb-4 text-gray-800 leading-relaxed space-y-1">
|
||||
{dialogOptions.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`dialog.options.${idx}`, { code })}</li>
|
||||
))}
|
||||
</ul>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("dialog.behaviour")}</p>
|
||||
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{dialogDirections.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`dialog.directions.${idx}`, { strong })}</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("confirm.heading")}</h2>
|
||||
<ol className="list-decimal pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{confirmItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`confirm.items.${idx}`, { code, strong, em, ul, li })}</li>
|
||||
))}
|
||||
</ol>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("switching.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("switching.intro", { strong })}</p>
|
||||
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{switchingItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`switching.items.${idx}`, { code })}</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("feedback.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("feedback.intro")}</p>
|
||||
<ul className="list-disc pl-6 mb-4 text-gray-800 leading-relaxed space-y-1">
|
||||
{feedbackItems.map((_, idx) => (
|
||||
<li key={idx}>{t(`feedback.items.${idx}`)}</li>
|
||||
))}
|
||||
<li>
|
||||
<pre className="mt-2 rounded-md bg-gray-100 p-3 overflow-x-auto text-xs font-mono text-gray-800 border border-gray-200">{t.raw("feedback.logsCommand") as string}</pre>
|
||||
</li>
|
||||
<li>{t.rich("feedback.versionLine", { link })}</li>
|
||||
</ul>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">{t.rich("feedback.issueLine", { ghlink })}</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("manual.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("manual.intro")}</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{`# Check current channel (returns "beta" or "stable")
|
||||
jq -r '.beta_program.status // "stable"' /usr/local/share/proxmenux/config.json
|
||||
|
||||
# Switch to Stable
|
||||
bash -c "$(wget -qLO - https://raw.githubusercontent.com/MacRimi/ProxMenux/main/install_proxmenux.sh)"
|
||||
|
||||
# Switch to Beta
|
||||
bash -c "$(wget -qLO - https://raw.githubusercontent.com/MacRimi/ProxMenux/develop/install_proxmenux_beta.sh)"`}</pre>
|
||||
|
||||
<Callout variant="info" title={t("unifiedCallout.title")}>
|
||||
{t.rich("unifiedCallout.body", { code, strong, em })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.downloadTitle")}>
|
||||
{t.rich("troubleshoot.downloadBody", { code })}
|
||||
<pre className="mt-2 rounded-md bg-white border border-slate-200 p-3 overflow-x-auto text-xs font-mono text-gray-800">{t.raw("troubleshoot.downloadCmd") as string}</pre>
|
||||
{t("troubleshoot.downloadOutro")}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.errorsTitle")}>
|
||||
{t("troubleshoot.errorsBody")}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.configTitle")}>
|
||||
{t.rich("troubleshoot.configBody", { code })}
|
||||
<pre className="mt-2 rounded-md bg-white border border-slate-200 p-3 overflow-x-auto text-xs font-mono text-gray-800">{t.raw("troubleshoot.configCmd") as string}</pre>
|
||||
{t("troubleshoot.configOutro")}
|
||||
</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>
|
||||
)
|
||||
}
|
||||
136
web/app/[locale]/docs/settings/change-language/page.tsx
Normal file
136
web/app/[locale]/docs/settings/change-language/page.tsx
Normal file
@@ -0,0 +1,136 @@
|
||||
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"
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.settings.changeLanguage.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://macrimi.github.io/ProxMenux/docs/settings/change-language",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type LangRow = { code: string; lang: string; notes: string }
|
||||
type StringItem = string
|
||||
type RelatedItem = { href: string; label: string; tail?: string }
|
||||
|
||||
export default async function ChangeLanguagePage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.settings.changeLanguage" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { settings: { changeLanguage: {
|
||||
supported: { rows: LangRow[] }
|
||||
underHood: { items: StringItem[] }
|
||||
related: { items: RelatedItem[] }
|
||||
} } }
|
||||
}
|
||||
const langRows = messages.docs.settings.changeLanguage.supported.rows
|
||||
const underHoodItems = messages.docs.settings.changeLanguage.underHood.items
|
||||
const relatedItems = messages.docs.settings.changeLanguage.related.items
|
||||
|
||||
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
|
||||
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={1}
|
||||
scriptPath="menus/config_menu.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="info" title={t("intro.title")}>
|
||||
{t.rich("intro.body", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="warning" title={t("warn.title")}>
|
||||
{t.rich("warn.body", { code, em })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("supported.heading")}</h2>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("supported.headerCode")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("supported.headerLang")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("supported.headerNotes")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{langRows.map((row, idx) => (
|
||||
<tr key={row.code} className={idx < langRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap font-mono">{row.code}</td>
|
||||
<td className="px-3 py-2 align-top">{row.lang}</td>
|
||||
<td className="px-3 py-2 align-top">{row.notes}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<Callout variant="tip" title={t("englishTip.title")}>
|
||||
{t("englishTip.body")}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("underHood.heading")}</h2>
|
||||
<ol className="list-decimal pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{underHoodItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`underHood.items.${idx}`, { code, em })}</li>
|
||||
))}
|
||||
</ol>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("manual.heading")}</h2>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{`# Set language to Spanish
|
||||
tmp=$(mktemp)
|
||||
jq --arg lang "es" '.language = $lang' /usr/local/share/proxmenux/config.json > "$tmp" \\
|
||||
&& mv "$tmp" /usr/local/share/proxmenux/config.json
|
||||
|
||||
# Verify
|
||||
jq -r '.language' /usr/local/share/proxmenux/config.json`}</pre>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.noOptionTitle")}>
|
||||
{t("troubleshoot.noOptionBody")}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.stillEnglishTitle")}>
|
||||
{t.rich("troubleshoot.stillEnglishBody", { code })}
|
||||
</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>
|
||||
)
|
||||
}
|
||||
189
web/app/[locale]/docs/settings/page.tsx
Normal file
189
web/app/[locale]/docs/settings/page.tsx
Normal file
@@ -0,0 +1,189 @@
|
||||
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,
|
||||
Activity,
|
||||
TestTube,
|
||||
Languages,
|
||||
Info,
|
||||
Trash2,
|
||||
} 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<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.settings.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
keywords: [
|
||||
"proxmenux settings",
|
||||
"proxmenux monitor activation",
|
||||
"proxmenux beta program",
|
||||
"proxmenux language",
|
||||
"proxmenux uninstall",
|
||||
"proxmenux version",
|
||||
"proxmenux configuration",
|
||||
],
|
||||
alternates: { canonical: "https://proxmenux.com/docs/settings" },
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://proxmenux.com/docs/settings",
|
||||
},
|
||||
twitter: {
|
||||
card: "summary",
|
||||
title: t("twitterTitle"),
|
||||
description: t("twitterDescription"),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type Option = {
|
||||
icon: string
|
||||
href: string
|
||||
title: string
|
||||
description: string
|
||||
badge?: string
|
||||
}
|
||||
type InstallRow = { type: string; bundles: string; menu?: string; menuRich?: string }
|
||||
|
||||
const ICONS: Record<string, React.ComponentType<{ className?: string; "aria-hidden"?: boolean }>> = {
|
||||
Activity,
|
||||
TestTube,
|
||||
Languages,
|
||||
Info,
|
||||
Trash2,
|
||||
}
|
||||
|
||||
function OptionCard({ option }: { option: Option }) {
|
||||
const Icon = ICONS[option.icon] || Activity
|
||||
return (
|
||||
<Link
|
||||
href={option.href}
|
||||
className="group flex items-start gap-3 rounded-md border border-gray-200 bg-white p-3 transition-colors hover:border-blue-400 hover:bg-blue-50"
|
||||
>
|
||||
<span className="inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md bg-gray-100 text-gray-600 group-hover:bg-blue-100 group-hover:text-blue-700">
|
||||
<Icon className="h-4 w-4" aria-hidden />
|
||||
</span>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex items-center gap-2 text-sm font-medium text-gray-900 group-hover:text-blue-700">
|
||||
<span className="flex items-center gap-1">
|
||||
{option.title}
|
||||
<ArrowRight className="h-3.5 w-3.5 text-gray-400 group-hover:text-blue-600 transition-transform group-hover:translate-x-0.5" />
|
||||
</span>
|
||||
{option.badge && (
|
||||
<span className="inline-flex items-center rounded-full border border-gray-300 bg-gray-50 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-gray-600">
|
||||
{option.badge}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="mt-0.5 text-xs text-gray-600 leading-snug">{option.description}</div>
|
||||
</div>
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
|
||||
export default async function SettingsOverviewPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.settings" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { settings: {
|
||||
installTypes: { rows: InstallRow[] }
|
||||
options: { list: Option[] }
|
||||
} }
|
||||
}
|
||||
const installRows = messages.docs.settings.installTypes.rows
|
||||
const optionsList = messages.docs.settings.options.list
|
||||
|
||||
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 kbd = (chunks: React.ReactNode) => <kbd>{chunks}</kbd>
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={3}
|
||||
scriptPath="menus/config_menu.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="info" title={t("intro.title")}>
|
||||
{t("intro.body")}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("opening.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("opening.body", { kbd })}
|
||||
</p>
|
||||
|
||||
<Image
|
||||
src="/settings/settings-menu.png"
|
||||
alt={t("opening.imageAlt")}
|
||||
width={900}
|
||||
height={500}
|
||||
className="rounded shadow-lg my-6"
|
||||
/>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("installTypes.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("installTypes.intro")}</p>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("installTypes.headerType")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("installTypes.headerBundles")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("installTypes.headerMenu")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{installRows.map((row, idx) => (
|
||||
<tr key={row.type} className={idx < installRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.type}</strong></td>
|
||||
<td className="px-3 py-2 align-top">{row.bundles}</td>
|
||||
<td className="px-3 py-2 align-top">
|
||||
{row.menuRich ? t.rich(`installTypes.rows.${idx}.menuRich`, { strong }) : row.menu}
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<Callout variant="info" title={t("installTypes.detectionTitle")}>
|
||||
{t.rich("installTypes.detectionBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("options.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("options.intro", { em })}
|
||||
</p>
|
||||
<div className="grid gap-3 md:grid-cols-2 mb-8 not-prose">
|
||||
{optionsList.map((o) => (
|
||||
<OptionCard key={o.href} option={o} />
|
||||
))}
|
||||
</div>
|
||||
|
||||
<Callout variant="tip" title={t("configTip.title")}>
|
||||
{t.rich("configTip.bodyRich", { code })}
|
||||
</Callout>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
181
web/app/[locale]/docs/settings/proxmenux-monitor/page.tsx
Normal file
181
web/app/[locale]/docs/settings/proxmenux-monitor/page.tsx
Normal file
@@ -0,0 +1,181 @@
|
||||
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"
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.settings.proxmenuxMonitor.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://macrimi.github.io/ProxMenux/docs/settings/proxmenux-monitor",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type StringItem = string
|
||||
type ToggleRow = { state: string; label: string; action: string }
|
||||
type RelatedItem = { href: string; label: string; tail?: string; tailRich?: string }
|
||||
|
||||
export default async function ProxmenuxMonitorPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.settings.proxmenuxMonitor" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { settings: { proxmenuxMonitor: {
|
||||
offers: { items: StringItem[] }
|
||||
toggle: { rows: ToggleRow[] }
|
||||
status: { items: StringItem[] }
|
||||
reset: { items: StringItem[] }
|
||||
related: { items: RelatedItem[] }
|
||||
} } }
|
||||
}
|
||||
const block = messages.docs.settings.proxmenuxMonitor
|
||||
const offersItems = block.offers.items
|
||||
const toggleRows = block.toggle.rows
|
||||
const statusItems = block.status.items
|
||||
const resetItems = block.reset.items
|
||||
const relatedItems = block.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 link = (chunks: React.ReactNode) => (
|
||||
<Link href="/docs/monitor/access-auth#recovering-password" className="text-blue-600 hover:underline">
|
||||
{chunks}
|
||||
</Link>
|
||||
)
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={3}
|
||||
scriptPath="menus/config_menu.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="info" title={t("intro.title")}>
|
||||
{t("intro.body")}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("offers.heading")}</h2>
|
||||
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{offersItems.map((_, idx) => (
|
||||
<li key={idx}>{t(`offers.items.${idx}`)}</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("access.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("access.intro")}</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("access.url") as string}</pre>
|
||||
<p className="mt-4 mb-6 text-gray-800 leading-relaxed">{t.rich("access.outro", { code })}</p>
|
||||
|
||||
<Callout variant="warning" title={t("warnConditional.title")}>
|
||||
{t.rich("warnConditional.body", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("toggle.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("toggle.intro")}</p>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("toggle.headerState")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("toggle.headerLabel")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("toggle.headerAction")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{toggleRows.map((row, idx) => (
|
||||
<tr key={row.state} className={idx < toggleRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.state}</strong></td>
|
||||
<td className="px-3 py-2 align-top">{row.label}</td>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap font-mono text-xs">{row.action}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">{t.rich("toggle.outro", { em })}</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("status.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("status.intro", { em })}</p>
|
||||
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{statusItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`status.items.${idx}`, { code, strong })}</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
<Callout variant="tip" title={t("manual.title")}>
|
||||
{t("manual.intro")}
|
||||
<pre className="mt-2 rounded-md bg-white border border-slate-200 p-3 overflow-x-auto text-xs font-mono text-gray-800">{t.raw("manual.code") as string}</pre>
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("reset.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("reset.intro")}</p>
|
||||
<ol className="list-decimal pl-6 mb-4 text-gray-800 leading-relaxed space-y-1">
|
||||
{resetItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`reset.items.${idx}`, { code, strong, em })}</li>
|
||||
))}
|
||||
</ol>
|
||||
|
||||
<Callout variant="info" title={t("reset.preservedTitle")}>
|
||||
{t.rich("reset.preservedBody", { code, strong })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="warning" title={t("reset.trustTitle")}>
|
||||
{t.rich("reset.trustBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">{t.rich("reset.seeAlso", { link })}</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("files.heading")}</h2>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("files.code") as string}</pre>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.missingTitle")}>
|
||||
{t.rich("troubleshoot.missingBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.unreachableTitle")}>
|
||||
{t("troubleshoot.unreachableBody")}
|
||||
<pre className="mt-2 rounded-md bg-white border border-slate-200 p-3 overflow-x-auto text-xs font-mono text-gray-800">{t.raw("troubleshoot.unreachableCmd") as string}</pre>
|
||||
{t.rich("troubleshoot.unreachableOutro", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.stopsTitle")}>
|
||||
{t.rich("troubleshoot.stopsBody", { code })}
|
||||
</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, idx) => (
|
||||
<li key={item.href}>
|
||||
<Link href={item.href} className="text-blue-600 hover:underline">
|
||||
{item.label}
|
||||
</Link>
|
||||
{item.tailRich ? t.rich(`related.items.${idx}.tailRich`, { code }) : item.tail}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
156
web/app/[locale]/docs/settings/show-version-information/page.tsx
Normal file
156
web/app/[locale]/docs/settings/show-version-information/page.tsx
Normal file
@@ -0,0 +1,156 @@
|
||||
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"
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.settings.showVersionInformation.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://macrimi.github.io/ProxMenux/docs/settings/show-version-information",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type ReportRow = { section: string; source: string; content?: string; contentRich?: string }
|
||||
type RelatedItem = { href: string; label: string; tail?: string }
|
||||
|
||||
export default async function ShowVersionInformationPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.settings.showVersionInformation" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { settings: { showVersionInformation: {
|
||||
reports: { rows: ReportRow[] }
|
||||
related: { items: RelatedItem[] }
|
||||
} } }
|
||||
}
|
||||
const reportRows = messages.docs.settings.showVersionInformation.reports.rows
|
||||
const relatedItems = messages.docs.settings.showVersionInformation.related.items
|
||||
|
||||
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={2}
|
||||
scriptPath="menus/config_menu.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="info" title={t("intro.title")}>
|
||||
{t("intro.body")}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("reports.heading")}</h2>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("reports.headerSection")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("reports.headerSource")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("reports.headerContent")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{reportRows.map((row, idx) => (
|
||||
<tr key={row.section} className={idx < reportRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.section}</strong></td>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap font-mono text-xs">{row.source}</td>
|
||||
<td className="px-3 py-2 align-top">
|
||||
{row.contentRich ? t.rich(`reports.rows.${idx}.contentRich`, { code }) : row.content}
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("sampleHeading")}</h2>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{`Current ProxMenux version: 1.2.3
|
||||
|
||||
Installation type:
|
||||
✓ Translation Version (Multi-language support)
|
||||
|
||||
Installed components:
|
||||
✓ post_install_settings: installed
|
||||
✓ post_install_system: installed
|
||||
✓ post_install_security: installed
|
||||
✓ proxmenux_monitor: installed
|
||||
✓ fail2ban: installed
|
||||
✗ lynis: removed
|
||||
|
||||
ProxMenux files:
|
||||
✓ menu → /usr/local/bin/menu
|
||||
✓ utils.sh → /usr/local/share/proxmenux/utils.sh
|
||||
✓ config.json → /usr/local/share/proxmenux/config.json
|
||||
✓ version.txt → /usr/local/share/proxmenux/version.txt
|
||||
✓ cache.json → /usr/local/share/proxmenux/cache.json
|
||||
|
||||
Virtual Environment:
|
||||
✓ Installed → /opt/googletrans-env
|
||||
✓ pip: Installed → /opt/googletrans-env/bin/pip
|
||||
|
||||
Current language:
|
||||
es`}</pre>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("manualHeading")}</h2>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{`# Version
|
||||
cat /usr/local/share/proxmenux/version.txt
|
||||
|
||||
# Install type detection (replicates the script's logic)
|
||||
[[ -d /opt/googletrans-env ]] && echo "venv: yes" || echo "venv: no"
|
||||
jq -r '.language // "missing"' /usr/local/share/proxmenux/config.json
|
||||
|
||||
# All component statuses
|
||||
jq 'to_entries[] | "\\(.key): \\(.value)"' /usr/local/share/proxmenux/config.json
|
||||
|
||||
# Current language
|
||||
jq -r '.language' /usr/local/share/proxmenux/config.json`}</pre>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.unknownTitle")}>
|
||||
{t.rich("troubleshoot.unknownBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.noConfigTitle")}>
|
||||
{t.rich("troubleshoot.noConfigBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.wrongStatusTitle")}>
|
||||
{t.rich("troubleshoot.wrongStatusBody", { code })}
|
||||
</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>
|
||||
)
|
||||
}
|
||||
153
web/app/[locale]/docs/settings/uninstall-proxmenux/page.tsx
Normal file
153
web/app/[locale]/docs/settings/uninstall-proxmenux/page.tsx
Normal file
@@ -0,0 +1,153 @@
|
||||
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"
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.settings.uninstallProxmenux.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://macrimi.github.io/ProxMenux/docs/settings/uninstall-proxmenux",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type StringItem = string
|
||||
type DepRow = { type: string; offered?: string; offeredRich?: string }
|
||||
type RelatedItem = { href: string; label: string; tail?: string }
|
||||
|
||||
export default async function UninstallProxMenuxPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.settings.uninstallProxmenux" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { settings: { uninstallProxmenux: {
|
||||
flow: { items: StringItem[] }
|
||||
deps: { rows: DepRow[] }
|
||||
restored: { items: StringItem[] }
|
||||
related: { items: RelatedItem[] }
|
||||
} } }
|
||||
}
|
||||
const block = messages.docs.settings.uninstallProxmenux
|
||||
const flowItems = block.flow.items
|
||||
const depRows = block.deps.rows
|
||||
const restoredItems = block.restored.items
|
||||
const relatedItems = block.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>
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={3}
|
||||
scriptPath="menus/config_menu.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="warning" title={t("scopeWarn.title")}>
|
||||
{t.rich("scopeWarn.body", { strong })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("flow.heading")}</h2>
|
||||
<ol className="list-decimal pl-6 mb-6 text-gray-800 leading-relaxed space-y-2">
|
||||
{flowItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`flow.items.${idx}`, { code, strong })}</li>
|
||||
))}
|
||||
</ol>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("deps.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("deps.intro", { strong })}</p>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("deps.headerType")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("deps.headerOffered")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{depRows.map((row, idx) => (
|
||||
<tr key={row.type} className={idx < depRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.type}</strong></td>
|
||||
<td className="px-3 py-2 align-top">
|
||||
{row.offeredRich ? t.rich(`deps.rows.${idx}.offeredRich`, { code }) : row.offered}
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<Callout variant="warning" title={t("deps.warnTitle")}>
|
||||
{t.rich("deps.warnBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("removed.heading")}</h2>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("removed.code") as string}</pre>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("restored.heading")}</h2>
|
||||
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{restoredItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`restored.items.${idx}`, { code, em })}</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
<Callout variant="info" title={t("othersCallout.title")}>
|
||||
{t.rich("othersCallout.body", { strong, em })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("manual.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("manual.intro", { code })}</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("manual.code") as string}</pre>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("reinstall.heading")}</h2>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">{t("reinstall.body")}</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.hangTitle")}>
|
||||
{t.rich("troubleshoot.hangBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.aptTitle")}>
|
||||
{t.rich("troubleshoot.aptBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.motdTitle")}>
|
||||
{t.rich("troubleshoot.motdBody", { code })}
|
||||
</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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user