Files
nanobot/webui/src/components/settings/overview/AboutSettingsView.tsx
T
Xubin Renandchengyongru fbb61a373f feat(update): integrate managed installs and recoverable in-app updates (#6168)
Add owner-aware Stable and Preview updates with explicit consent, verified release plans, protected process handoff and bounded service recovery. Keep configuration and conversations separate from program rollback.

Include the compact About controls, Windows long-path support, native package recovery checks and optional macOS Dock lifecycle integration. Preserve documented guidance for installations owned by other managers.

This code integration does not publish packages, enable signing or advance the public update channel.

Co-authored-by: chengyongru <61816729+chengyongru@users.noreply.github.com>
2026-10-21 19:16:56 +08:00

49 lines
2.0 KiB
TypeScript

import type { ReactNode } from "react";
import { BookOpen, ExternalLink, Github, MessageCircle } from "lucide-react";
import { useTranslation } from "react-i18next";
import { SettingsGroup } from "@/components/settings/shared/SettingsControls";
export function AboutSettingsLayout({ versionCheck, links, starLink }: {
versionCheck: ReactNode;
links: ReactNode;
starLink: ReactNode;
}) {
return <div className="flex flex-1 flex-col gap-5">
<div className="flex flex-col items-center gap-3 py-6 text-center">
<img src="/brand/nanobot_mark.svg" alt="" className="h-16 w-16 select-none" draggable={false} />
<h1><img src="/brand/nanobot_wordmark.svg" alt="nanobot" width={800} height={164} className="h-auto w-40 select-none dark:brightness-150" draggable={false} /></h1>
</div>
{versionCheck}
{links}
<div className="mt-auto pt-8 text-center">{starLink}</div>
</div>;
}
export function AboutSettingsView({ reportIssueUrl, versionCheck, starLink }: {
reportIssueUrl: string;
versionCheck: ReactNode;
starLink: ReactNode;
}) {
const { t } = useTranslation();
const links = [
{ key: "sourceCode", icon: Github, href: "https://github.com/HKUDS/nanobot" },
{ key: "documentation", icon: BookOpen, href: "https://nanobot.wiki/" },
{ key: "reportIssue", icon: MessageCircle, href: reportIssueUrl },
];
return (
<AboutSettingsLayout versionCheck={versionCheck} starLink={starLink} links={
<SettingsGroup>
{links.map(({ key, icon: Icon, href }) => (
<a key={key} href={href} target="_blank" rel="noopener noreferrer"
className="settings-list-row flex select-none items-center gap-3 text-[14px] settings-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">
<Icon className="h-4 w-4 text-muted-foreground" aria-hidden />
<span className="flex-1">{t(`settings.about.${key}`)}</span>
<ExternalLink className="h-3.5 w-3.5 text-muted-foreground" aria-hidden />
</a>
))}
</SettingsGroup>
} />
);
}