import { buttonVariants } from '@affine/admin/components/ui/button'; import { Separator } from '@affine/admin/components/ui/separator'; import { cn } from '@affine/admin/utils'; import { AlbumIcon, ChevronRightIcon, GithubIcon, MailWarningIcon, UploadCloudIcon, } from 'lucide-react'; import { z } from 'zod'; const appChannelSchema = z.enum(['stable', 'canary', 'beta', 'internal']); type Channel = z.infer; const appNames = { stable: 'AFFiNE', canary: 'AFFiNE Canary', beta: 'AFFiNE Beta', internal: 'AFFiNE Internal', } satisfies Record; const links = [ { href: runtimeConfig.githubUrl, icon: , label: 'Star AFFiNE on GitHub', }, { href: runtimeConfig.githubUrl, icon: , label: 'Report an Issue', }, { href: 'https://docs.affine.pro/docs/self-host-affine', icon: , label: 'Self-host Document', }, { href: 'https://affine.pro/pricing', icon: , label: 'Upgrade to Pro', }, ]; export function AboutAFFiNE() { const { appBuildType, appVersion, editorVersion } = runtimeConfig; const appName = appNames[appBuildType]; return (
About AFFiNE
{links.map(({ href, icon, label }, index) => (
{icon} {label}
{index < links.length - 1 && }
))}
{`App Version: ${appName} ${appVersion}`}
{`Editor Version: ${editorVersion}`}
); }