import React from 'react' import { Info, Coffee, Heart, ExternalLink, Bug, Lightbulb, BookOpen, Tent, Compass, Plane, Crown, Infinity as InfinityIcon } from 'lucide-react' import { useTranslation } from '../../i18n' import Section from './Section' interface Props { appVersion: string } type SupporterTierId = 'no_return_ticket' | 'lost_luggage_vip' | 'business_class_dreamer' | 'budget_traveller' | 'hostel_bunkmate' interface SupporterTier { id: SupporterTierId labelKey: string price: string gradient: string glow: string icon: typeof Tent } const SUPPORTER_TIERS: SupporterTier[] = [ { id: 'no_return_ticket', labelKey: 'settings.about.supporter.tier.noReturnTicket', price: '∞', gradient: 'linear-gradient(135deg, #fbbf24, #ec4899 55%, #6366f1)', glow: 'rgba(236,72,153,0.45)', icon: InfinityIcon }, { id: 'lost_luggage_vip', labelKey: 'settings.about.supporter.tier.lostLuggageVip', price: '$30', gradient: 'linear-gradient(135deg, #a855f7, #ec4899)', glow: 'rgba(168,85,247,0.35)', icon: Crown }, { id: 'business_class_dreamer', labelKey: 'settings.about.supporter.tier.businessClassDreamer', price: '$15', gradient: 'linear-gradient(135deg, #6366f1, #0ea5e9)', glow: 'rgba(99,102,241,0.35)', icon: Plane }, { id: 'budget_traveller', labelKey: 'settings.about.supporter.tier.budgetTraveller', price: '$10', gradient: 'linear-gradient(135deg, #14b8a6, #06b6d4)', glow: 'rgba(20,184,166,0.3)', icon: Compass }, { id: 'hostel_bunkmate', labelKey: 'settings.about.supporter.tier.hostelBunkmate', price: '$5', gradient: 'linear-gradient(135deg, #64748b, #94a3b8)', glow: 'rgba(100,116,139,0.25)', icon: Tent }, ] interface Supporter { username: string tier: SupporterTierId since: string link?: string } const SUPPORTERS: Supporter[] = [ { username: 'Someone', tier: 'hostel_bunkmate', since: '2026-04' }, ] function SupporterSection({ t, locale }: { t: (key: string, vars?: Record) => string; locale: string }) { if (SUPPORTERS.length === 0) return null const formatSince = (yearMonth: string): string => { const [y, m] = yearMonth.split('-').map(Number) if (!y || !m) return yearMonth try { return new Date(y, m - 1, 1).toLocaleDateString(locale, { year: 'numeric', month: 'long' }) } catch { return yearMonth } } return (
{t('settings.about.supporters.badge')}

{t('settings.about.supporters.title')}

{t('settings.about.supporters.subtitle')}

{SUPPORTER_TIERS.map(tier => { const members = SUPPORTERS.filter(s => s.tier === tier.id) const empty = members.length === 0 const TierIcon = tier.icon return (
{t(tier.labelKey)} {tier.price}
{empty && ( {t('settings.about.supporters.tierEmpty')} )} {members.map(m => { const chipContent = ( <> {m.username} · {t('settings.about.supporters.since', { date: formatSince(m.since) })} · {formatSince(m.since)} ) return m.link ? ( { e.currentTarget.style.borderColor = 'var(--text-faint)'; e.currentTarget.style.boxShadow = `0 2px 8px ${tier.glow}` }} onMouseLeave={e => { e.currentTarget.style.borderColor = 'var(--border-primary)'; e.currentTarget.style.boxShadow = 'none' }} > {chipContent} ) : (
{chipContent}
) })}
) })}
) } export default function AboutTab({ appVersion }: Props): React.ReactElement { const { t, locale } = useTranslation() return (

{t('settings.about.description')}

{t('settings.about.madeWith')}{' '} {' '}{t('settings.about.madeBy')}{' '} v{appVersion}

{ e.currentTarget.style.borderColor = '#ff5e5b'; e.currentTarget.style.boxShadow = '0 0 0 1px #ff5e5b22' }} onMouseLeave={e => { e.currentTarget.style.borderColor = 'var(--border-primary)'; e.currentTarget.style.boxShadow = 'none' }} >
Ko-fi
{t('admin.github.support')}
{ e.currentTarget.style.borderColor = '#ffdd00'; e.currentTarget.style.boxShadow = '0 0 0 1px #ffdd0022' }} onMouseLeave={e => { e.currentTarget.style.borderColor = 'var(--border-primary)'; e.currentTarget.style.boxShadow = 'none' }} >
Buy Me a Coffee
{t('admin.github.support')}
{ e.currentTarget.style.borderColor = '#5865F2'; e.currentTarget.style.boxShadow = '0 0 0 1px #5865F222' }} onMouseLeave={e => { e.currentTarget.style.borderColor = 'var(--border-primary)'; e.currentTarget.style.boxShadow = 'none' }} >
Discord
Join the community
{ e.currentTarget.style.borderColor = '#ef4444'; e.currentTarget.style.boxShadow = '0 0 0 1px #ef444422' }} onMouseLeave={e => { e.currentTarget.style.borderColor = 'var(--border-primary)'; e.currentTarget.style.boxShadow = 'none' }} >
{t('settings.about.reportBug')}
{t('settings.about.reportBugHint')}
{ e.currentTarget.style.borderColor = '#f59e0b'; e.currentTarget.style.boxShadow = '0 0 0 1px #f59e0b22' }} onMouseLeave={e => { e.currentTarget.style.borderColor = 'var(--border-primary)'; e.currentTarget.style.boxShadow = 'none' }} >
{t('settings.about.featureRequest')}
{t('settings.about.featureRequestHint')}
{ e.currentTarget.style.borderColor = '#6366f1'; e.currentTarget.style.boxShadow = '0 0 0 1px #6366f122' }} onMouseLeave={e => { e.currentTarget.style.borderColor = 'var(--border-primary)'; e.currentTarget.style.boxShadow = 'none' }} >
Wiki
{t('settings.about.wikiHint')}
) }