"use client" import Image from "next/image" import { Github, Heart, BookOpen, MessageSquare, Bug, Sparkles, Scale, ExternalLink, } from "lucide-react" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "./ui/card" import { APP_VERSION } from "./release-notes-modal" import { useT } from "../lib/i18n/provider" // Issue #191: a dedicated About tab. Centralises project metadata // (version, license, author) and every external link the project // already exposes — GitHub, docs, donation. Replaces the lone // "Support and contribute to the project" footer link with a proper // information surface that's easy to extend with new social channels // without re-cluttering the dashboard footer. interface LinkRow { labelKey: string descriptionKey: string href: string Icon: React.ComponentType<{ className?: string }> accent?: keyof typeof ACCENT_CLASSES } // Tailwind only emits classes that appear as literal strings in the // source. A dynamic `bg-${accent}/10` template does not survive the // purge step, so each accent maps to a fully-spelled class pair below. const ACCENT_CLASSES = { gray: "bg-gray-500/10 text-gray-400", blue: "bg-blue-500/10 text-blue-500", purple: "bg-purple-500/10 text-purple-400", red: "bg-red-500/10 text-red-500", pink: "bg-pink-500/10 text-pink-500", } as const const PROJECT_LINKS: LinkRow[] = [ { labelKey: "about.links.repository.label", descriptionKey: "about.links.repository.description", href: "https://github.com/MacRimi/ProxMenux", Icon: Github, accent: "gray", }, { labelKey: "about.links.documentation.label", descriptionKey: "about.links.documentation.description", href: "https://proxmenux.com", Icon: BookOpen, accent: "blue", }, { labelKey: "about.links.discussions.label", descriptionKey: "about.links.discussions.description", href: "https://github.com/MacRimi/ProxMenux/discussions", Icon: MessageSquare, accent: "purple", }, { labelKey: "about.links.issues.label", descriptionKey: "about.links.issues.description", href: "https://github.com/MacRimi/ProxMenux/issues", Icon: Bug, accent: "red", }, ] const SUPPORT_LINKS: LinkRow[] = [ { labelKey: "about.links.support.label", descriptionKey: "about.links.support.description", href: "https://ko-fi.com/macrimi", Icon: Heart, accent: "pink", }, ] function LinkCard({ row }: { row: LinkRow }) { const t = useT() const accentClass = ACCENT_CLASSES[row.accent ?? "blue"] // Style mirrors the PCI Devices cards in the Hardware tab: subtle // translucent background by default, slightly lighter on hover, no // accent-coloured borders or text colour changes — keeps the look // consistent with the rest of the project. return (
{t(row.labelKey)}

{t(row.descriptionKey)}

) } export function About() { const t = useT() return (
{/* Hero — logo, name, version, one-line description. */}
{t("about.logoAlt")}

ProxMenux Monitor

{t("about.heroDescription")}

v{APP_VERSION} {/* Beta versions surface their pre-release notes on the GitHub Releases page (where each beta is tagged + signed); stable versions point at the canonical web changelog which only carries shipped releases. Detection: the APP_VERSION string carries a "-beta" / "-rc" / "-alpha" suffix for any non-stable build. */} {(() => { const isPrerelease = /-(beta|rc|alpha)/i.test(APP_VERSION) const href = isPrerelease ? "https://github.com/MacRimi/ProxMenux/releases" : "https://proxmenux.com/en/changelog" const label = isPrerelease ? t("about.releaseNotes") : t("about.changelog") return ( {label} ) })()}
{/* Project links — GitHub, docs, discussions, bug tracker. */} {t("about.project.title")} {t("about.project.description")}
{PROJECT_LINKS.map(row => ( ))}
{/* Support + License combined — donation link and licensing info in one card. The previous layout had a separate "Author" block that has been removed by request. */} {t("about.support.title")} {t("about.support.description")}
{SUPPORT_LINKS.map(row => ( ))}
{t("about.license.label")}

{t("about.license.description")}

) }