Files
TREK/client/src/mobile/screens/settings/MSettingsAbout.tsx
T
Maurice bcdcd69a64 feat(notices): 5.2.0 release modal and Patreon for monthly support
The release modal now shows 5.2.0: booking mails that land in the trip,
live flight status and the new trip PDF, each with its own drawn card,
and links the 5.2.0 release notes. The maintainer note and the support
block are rewritten, shorter and without the sponsor wording.

Patreon joins Buy Me a Coffee and Ko-fi as the monthly way to support
TREK: a full-width button in the release and thank-you notices (a new
optional tertiaryCta on the notice contract), a tile in About and in the
admin GitHub panel on desktop and phone, the README badges and
FUNDING.yml. Like the other donation links it stays hidden inside the
native apps.
2026-11-23 21:15:54 +01:00

63 lines
3.2 KiB
TypeScript

import { Bug, BookOpen, Coffee, ExternalLink, Heart, Info, Lightbulb } from 'lucide-react'
import type { ComponentType } from 'react'
import { useTranslation } from '../../../i18n'
import { MSetCard } from './MSettingsUi'
import { withoutDonationsInApp } from '../../../utils/donations'
import PatreonIcon, { PATREON_URL } from '../../../components/shared/PatreonIcon'
interface AboutLink {
href: string
icon: ComponentType<{ size?: number; strokeWidth?: number }>
title: string
sub: string
}
/** "About" section — AboutTab parity as tappable link rows. */
export default function MSettingsAbout({ appVersion }: { appVersion: string }) {
const { t } = useTranslation()
const links: AboutLink[] = withoutDonationsInApp([
{ href: PATREON_URL, icon: PatreonIcon, title: 'Patreon', sub: t('admin.github.supportMonthly') },
{ href: 'https://ko-fi.com/mauriceboe', icon: Coffee, title: 'Ko-fi', sub: t('admin.github.support') },
{ href: 'https://buymeacoffee.com/mauriceboe', icon: Heart, title: 'Buy Me a Coffee', sub: t('admin.github.support') },
{ href: 'https://discord.gg/NhZBDSd4qW', icon: Heart, title: 'Discord', sub: 'Join the community' },
{ href: 'https://github.com/liketrek/TREK/issues/new?template=bug_report.yml', icon: Bug, title: t('settings.about.reportBug'), sub: t('settings.about.reportBugHint') },
{ href: 'https://github.com/liketrek/TREK/discussions/new?category=feature-requests', icon: Lightbulb, title: t('settings.about.featureRequest'), sub: t('settings.about.featureRequestHint') },
{ href: 'https://github.com/liketrek/TREK/wiki', icon: BookOpen, title: 'Wiki', sub: t('settings.about.wikiHint') },
])
return (
<MSetCard title={t('settings.about')} icon={Info}>
<p className="text-[0.78125rem] leading-relaxed text-m-muted">{t('settings.about.description')}</p>
<p className="mt-2 font-geist text-[0.6875rem] text-m-faint">
{t('settings.about.madeWith')} <Heart size={10} className="inline-block align-[-1px] text-[color:var(--m-st-danger)]" />{' '}
{t('settings.about.madeBy')}{' '}
<span className="inline-flex items-center rounded-full bg-[color:var(--m-ic)] px-[7px] py-[1px] font-geist text-[0.625rem] font-bold text-m-muted align-[1px]">
v{appVersion}
</span>
</p>
<div className="mt-3 flex flex-col gap-2">
{links.map((link) => (
<a
key={link.href}
href={link.href}
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-[13px] rounded-xl border border-[color:var(--m-rowbr)] bg-[color:var(--m-sheet)] px-[14px] py-3 no-underline"
>
<span className="flex h-10 w-10 flex-none items-center justify-center rounded-xl bg-[color:var(--m-ic)] text-m-ink">
<link.icon size={19} strokeWidth={2} />
</span>
<span className="min-w-0 flex-1">
<span className="block truncate text-[0.8125rem] font-bold text-m-ink">{link.title}</span>
<span className="block font-geist text-[0.625rem] text-m-muted">{link.sub}</span>
</span>
<ExternalLink size={14} className="flex-none text-m-faint" />
</a>
))}
</div>
</MSetCard>
)
}