1 import { c } from 'ttag';
3 import { Href } from '@proton/atoms';
4 import QRCode from '@proton/components/components/image/QRCode';
5 import Logo from '@proton/components/components/logo/Logo';
8 CALENDAR_MOBILE_APP_LINKS,
10 MAIL_MOBILE_APP_LINKS,
11 } from '@proton/shared/lib/constants';
12 import appStoreSvg from '@proton/styles/assets/img/illustrations/app-store.svg';
13 import playStoreSvg from '@proton/styles/assets/img/illustrations/play-store.svg';
15 type SupportedAPPS = 'proton-mail' | 'proton-calendar';
17 interface ProductCardProps {
21 playStoreLink: string;
24 const ProductDownloadCard = ({ app, qrCodeLink, appStoreLink, playStoreLink }: ProductCardProps) => {
25 const appName = app === 'proton-mail' ? MAIL_APP_NAME : CALENDAR_APP_NAME;
28 <section className="flex flex-column gap-6 items-center border rounded-lg p-6 text-center align-center">
30 className="border rounded p-1.5 h-custom w-custom"
31 style={{ '--h-custom': '7.5rem', '--w-custom': '7.5rem' }}
33 <QRCode value={qrCodeLink} />
36 <Logo appName={app} variant="glyph-only" size={12} />
37 <h3 className="text-bold text-4xl">{appName}</h3>
39 <div className="flex gap-2">
40 <Href href={appStoreLink} target="_blank">
43 style={{ '--h-custom': '2.25rem' }}
45 // translator: Shows the app name such as: Proton Mail on App Store. Only supports Proton Mail and Proton Calendar
46 alt={c('Get started checklist instructions').t`${appName} on App Store`}
49 <Href href={playStoreLink} target="_blank">
52 style={{ '--h-custom': '2.25rem' }}
54 // translator: Shows the app name such as: Proton Mail on Play Store. Only supports Proton Mail and Proton Calendar
55 alt={c('Get started checklist instructions').t`${appName} on Play Store`}
63 const MobileAppSecttingsSection = () => {
65 <div className="flex gap-6 mt-3">
68 qrCodeLink={MAIL_MOBILE_APP_LINKS.qrCode}
69 appStoreLink={MAIL_MOBILE_APP_LINKS.appStore}
70 playStoreLink={MAIL_MOBILE_APP_LINKS.playStore}
74 qrCodeLink={CALENDAR_MOBILE_APP_LINKS.qrCode}
75 appStoreLink={CALENDAR_MOBILE_APP_LINKS.appStore}
76 playStoreLink={CALENDAR_MOBILE_APP_LINKS.playStore}
82 export default MobileAppSecttingsSection;