@@ -41,6 +41,16 @@ export function LoginMain(): JSX.Element {
41
41
new URL ( data . uri ) . searchParams . get ( 'session' ) as string
42
42
) ;
43
43
} ;
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
+ } ;
44
54
45
55
useEffect ( ( ) => {
46
56
getOfferData ( )
@@ -77,20 +87,39 @@ export function LoginMain(): JSX.Element {
77
87
< div >
78
88
{ isMobileDevice ( ) ? (
79
89
< 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 >
80
93
< a
81
94
href = { qr ? getDeepLinkUrl ( qr ) : '#' }
82
95
className = 'px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-center'
83
96
>
84
97
Login with eID Wallet
85
98
</ 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 >
89
106
</ div >
90
107
) : (
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 >
91
112
< div className = 'p-2 rounded-md bg-white w-fit' >
92
113
{ qr && < QRCode value = { qr } /> }
93
114
</ 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 >
94
123
) }
95
124
</ div >
96
125
< div className = 'absolute right-0 rotate-90 top-1/2' >
@@ -110,12 +139,14 @@ export function LoginMain(): JSX.Element {
110
139
separation, where all your personal content is stored in
111
140
your own sovereign eVault, not on centralised servers.
112
141
</ div >
142
+ < a href = "https://metastate.foundation" target = "_blank" rel = "noopener noreferrer" >
113
143
< Image
114
144
src = '/assets/w3dslogo.svg'
115
145
alt = 'W3DS logo'
116
146
width = { 100 }
117
147
height = { 20 }
118
148
/>
149
+ </ a >
119
150
</ div >
120
151
</ div >
121
152
</ main >
0 commit comments