diff --git a/src/components/AppDownloadNudge.tsx b/src/components/AppDownloadNudge.tsx new file mode 100644 index 00000000..234d6f5d --- /dev/null +++ b/src/components/AppDownloadNudge.tsx @@ -0,0 +1,49 @@ +import { Capacitor } from '@capacitor/core'; +import { useTranslation } from 'react-i18next'; +import { ArrowRight } from 'lucide-react'; +import { useAppContext } from '@/hooks/useAppContext'; +import { ZAPSTORE_URL } from '@/lib/zapstore'; + +/** + * Zapstore download nudge — prompts mobile-web visitors to install the native + * Android app. Hidden inside the native app (you're already in it) and on + * desktop (`sm:hidden`), where downloading works differently. + */ +export function AppDownloadNudge() { + const { t } = useTranslation(); + const { config } = useAppContext(); + + if (Capacitor.isNativePlatform()) return null; + + return ( +
+

+ {t('feed.getApp.eyebrow')} +

+
+ {config.appName} +
+

+ {t('feed.getApp.title', { appName: config.appName })} +

+

+ {t('feed.getApp.subtitle', { appName: config.appName })} +

+
+ + {t('feed.getApp.download')} + + +
+
+ ); +} diff --git a/src/components/auth/AccountSwitcher.tsx b/src/components/auth/AccountSwitcher.tsx index 684243fd..255edec6 100644 --- a/src/components/auth/AccountSwitcher.tsx +++ b/src/components/auth/AccountSwitcher.tsx @@ -7,8 +7,10 @@ import { useState } from 'react'; import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; -import { Activity, Bell, ChevronDown, CircleHelp, LayoutDashboard, LogOut, Search, Settings, User, UserIcon, UserPlus, Wallet } from 'lucide-react'; +import { Capacitor } from '@capacitor/core'; +import { Activity, Bell, ChevronDown, CircleHelp, Download, LayoutDashboard, LogOut, Search, Settings, User, UserIcon, UserPlus, Wallet } from 'lucide-react'; import { nip19 } from 'nostr-tools'; +import { ZAPSTORE_URL } from '@/lib/zapstore'; import { DropdownMenu, DropdownMenuContent, @@ -144,6 +146,14 @@ export function AccountSwitcher({ onAddAccountClick }: AccountSwitcherProps) { {t('nav.about')} + {!Capacitor.isNativePlatform() && ( + + + + {t('nav.getApp')} + + + )} { @@ -12,7 +13,12 @@ const Index = () => { description: t('feed.indexTagline'), }); - return ; + return ( + <> + + + + ); }; export default Index;