@@ -41,6 +41,16 @@ export function LoginMain(): JSX.Element {
4141 new URL ( data . uri ) . searchParams . get ( 'session' ) as string
4242 ) ;
4343 } ;
44+ const getAppStoreLink = ( ) => {
45+ const userAgent = navigator . userAgent || navigator . vendor || window . opera ;
46+ if ( / a n d r o i d / i. test ( userAgent ) ) {
47+ return "https://play.google.com/store/apps/details?id=foundation.metastate.eid_wallet" ;
48+ }
49+ if ( / i P a d | i P h o n e | i P o d / . test ( userAgent ) && ! window . MSStream ) {
50+ return "https://apps.apple.com/in/app/eid-for-w3ds/id6747748667"
51+ }
52+ return "https://play.google.com/store/apps/details?id=foundation.metastate.eid_wallet" ;
53+ } ;
4454
4555 useEffect ( ( ) => {
4656 getOfferData ( )
@@ -77,20 +87,39 @@ export function LoginMain(): JSX.Element {
7787 < div >
7888 { isMobileDevice ( ) ? (
7989 < div className = 'flex flex-col gap-4 items-center' >
90+ < div className = 'text-xs text-gray-500 text-center max-w-xs' >
91+ Click the button to open your < a href = { getAppStoreLink ( ) } > < b > < u > eID App</ u > </ b > </ a > to login
92+ </ div >
8093 < a
8194 href = { qr ? getDeepLinkUrl ( qr ) : '#' }
8295 className = 'px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-center'
8396 >
8497 Login with eID Wallet
8598 </ a >
86- < div className = 'text-xs text-gray-500 text-center max-w-xs' >
87- Click the button to open your eID wallet app
88- </ div >
99+ < div className = "text-center mt-4" >
100+ < p className = "text-sm text-gray-500" >
101+ < span className = "mb-1 block font-bold text-gray-600" > The button is valid for 60 seconds</ span >
102+ < span className = "block font-light text-gray-600" > Please refresh the page if it expires</ span
103+ >
104+ </ p >
105+ </ div >
89106 </ div >
90107 ) : (
108+ < div className = 'flex flex-col gap-4 items-center' >
109+ < p className = "text-gray-600" >
110+ Scan the QR code using your < a href = { getAppStoreLink ( ) } > < b > < u > eID App</ u > </ b > </ a > to login
111+ </ p >
91112 < div className = 'p-2 rounded-md bg-white w-fit' >
92113 { qr && < QRCode value = { qr } /> }
93114 </ div >
115+ < div className = "text-center mt-4" >
116+ < p className = "text-sm text-gray-500" >
117+ < span className = "mb-1 block font-bold text-gray-600" > The code is valid for 60 seconds</ span >
118+ < span className = "block font-light text-gray-600" > Please refresh the page if it expires</ span
119+ >
120+ </ p >
121+ </ div >
122+ </ div >
94123 ) }
95124 </ div >
96125 < div className = 'absolute right-0 rotate-90 top-1/2' >
@@ -110,12 +139,14 @@ export function LoginMain(): JSX.Element {
110139 separation, where all your personal content is stored in
111140 your own sovereign eVault, not on centralised servers.
112141 </ div >
142+ < a href = "https://metastate.foundation" target = "_blank" rel = "noopener noreferrer" >
113143 < Image
114144 src = '/assets/w3dslogo.svg'
115145 alt = 'W3DS logo'
116146 width = { 100 }
117147 height = { 20 }
118148 />
149+ </ a >
119150 </ div >
120151 </ div >
121152 </ main >
0 commit comments