import { useSeoMeta } from '@unhead/react'; import { Link, useSearchParams } from 'react-router-dom'; import { EditProfileForm } from '@/components/EditProfileForm'; import { SkaterDirectoryCard } from '@/components/SkaterDirectoryCard'; import { ProfilePreviewCard } from '@/components/ProfilePreviewCard'; import { RelayListManager } from '@/components/RelayListManager'; import { WalletModal } from '@/components/WalletModal'; import { SecuritySettings } from '@/components/SecuritySettings'; import { RelatrSettings } from '@/components/RelatrSettings'; import { CVMHealthCheck } from '@/components/CVMHealthCheck'; import { SasquatchAiStatusCard } from '@/components/SasquatchAiStatusCard'; import { GrantProCard } from '@/components/GrantProCard'; import { AdminReviewCard } from '@/components/AdminReviewCard'; import { RegionBackfillCard } from '@/components/RegionBackfillCard'; import { NotificationSettingsCard } from '@/components/NotificationSettingsCard'; import { CoordinatorSettingsCard } from '@/components/CoordinatorSettingsCard'; import { LanguageSelector } from '@/components/LanguageToggle'; import { DesktopNavManager } from '@/components/DesktopNavManager'; import { MyDataTab } from '@/components/MyDataTab'; import { useQueryClient } from '@tanstack/react-query'; import { useNostr } from '@nostrify/react'; import { NSchema as n, type NostrMetadata } from '@nostrify/nostrify'; import { useState } from 'react'; import { LoginArea } from '@/components/auth/LoginArea'; import { Button } from '@/components/ui/button'; import { useCurrentUser } from '@/hooks/useCurrentUser'; import { useAppContext } from '@/hooks/useAppContext'; import { useCitrine } from '@/hooks/useCitrine'; import { toast } from '@/hooks/useToast'; import { cn } from '@/lib/utils'; import { NIP05_PROVIDERS } from '@/lib/nip05Providers'; import { SKATE_NIP05_DOMAIN } from '@/lib/skateNip05'; import { useTranslation } from '@/contexts/language'; import { User, Radio, Wallet, Wrench, RotateCcw, Shield, ExternalLink, Languages, RefreshCw, AlertCircle, Database, Package, ChevronRight, ChevronLeft, Smartphone, Download, Zap, WifiOff, Bell, Server } from 'lucide-react'; // ─── Types ──────────────────────────────────────────────────────────────────── type Section = | null | 'profile' | 'follows' | 'nip05' | 'security' | 'mydata' | 'language' | 'appearance' | 'relays' | 'wallet' | 'stash' | 'notifications' | 'coordinator' | 'advanced'; // ─── Back header ────────────────────────────────────────────────────────────── function BackHeader({ title, onBack }: { title: string; onBack: () => void }) { const { t } = useTranslation(); return (
{label}
{sublabel &&{sublabel}
}{title}
{t('settingsUi.settingsPage.finishProfile')}
{t('settingsUi.settingsPage.loginToEdit')}
{t('settingsUi.settingsPage.noProfileRelays')}
{t('settingsUi.settingsPage.nip05Desc')}
{t('settingsUi.settingsPage.freeFromSkateSpots')}
{t('settingsUi.settingsPage.claimHandleBefore')}{' '} you@{SKATE_NIP05_DOMAIN} {t('settingsUi.settingsPage.claimHandleAfter')}
{p.name}
{p.desc}
{t('settingsUi.settingsPage.localRelay')} Citrine
{state === 'off' && t('settingsUi.settingsPage.citrineOff')} {state === 'searching' && t('settingsUi.settingsPage.citrineSearching')} {state === 'live' && t('settingsUi.settingsPage.citrineLive')} {state === 'waiting' && t('settingsUi.settingsPage.citrineWaiting')}
{t('settingsUi.settingsPage.cantReachStrong')}{' '} {t('settingsUi.settingsPage.cantReachBefore')} {t('settingsUi.settingsPage.started')}{t('settingsUi.settingsPage.cantReachAfter')}
{t('settingsUi.settingsPage.citrinePrivacy')}
{t('settingsUi.settingsPage.relayPrivacyBefore')} {t('settingsUi.settingsPage.ipAddress')} {t('settingsUi.settingsPage.relayPrivacyAfter')}{' '} {t('common.learnMore')}
{t('settingsUi.settingsPage.communityRelay')}
{useSkateRelay ? t('settingsUi.settingsPage.syncingGlobal') : t('settingsUi.settingsPage.usingOnlyPersonalShort')}
{t('settingsUi.settingsPage.language')}
{t('settingsUi.settingsPage.darkModeOnly')}
{t('settingsUi.settingsPage.darkModeDesc')}
{t('settingsUi.settingsPage.navigation')}
{t('settingsUi.settingsPage.sasquatchGuide')}
{t('settingsUi.settingsPage.sasquatchResetDesc')}
{t('settingsUi.settingsPage.loginToWallet')}
{t('settingsUi.settingsPage.openWallet')}
{t('settingsUi.settingsPage.balanceSendReceive')}
{t('settingsUi.settingsPage.subtitle')}