@@ -118,13 +118,47 @@ module.exports = (service, endpoint) => {
118
118
// Instead, we need to render a page and then "browse" from that page to the normal frontend:
119
119
120
120
// id=cl only set for playwright. Why can't it locate this anchor in any other way?
121
- return {
122
- head : html `< meta http-equiv ="refresh " content ="0; url= ${ nextPath } "> ` ,
123
- body : html `
124
- < h1 > Authentication Successful</ h1 >
125
- < div > < a href ="${ nextPath } " id ="cl "> Continue to ODK Central</ a > </ div >
126
- ` ,
127
- } ;
121
+ return html `
122
+ <!doctype html>
123
+ < html >
124
+ < head >
125
+ < title > Loading... | ODK Central</ title >
126
+ < meta http-equiv ="refresh " content ="0; url= ${ nextPath } ">
127
+ < style >
128
+ # container { text-align : center }
129
+
130
+ .lds-spinner { display : inline-block; position : relative; width : 80px ; height : 80px }
131
+ .lds-spinner div { transform-origin : 40px 40px ; animation : lds-spinner 1.2s linear infinite }
132
+ .lds-spinner div : after {
133
+ content : " " ; display : block; position : absolute; top : 3px ; left : 37px ;
134
+ width : 6px ; height : 18px ; border-radius : 20% ; background : # 000 ;
135
+ }
136
+ .lds-spinner div : nth-child (1 ) { transform : rotate (0deg ); animation-delay : -1.1s }
137
+ .lds-spinner div : nth-child (2 ) { transform : rotate (30deg ); animation-delay : -1s }
138
+ .lds-spinner div : nth-child (3 ) { transform : rotate (60deg ); animation-delay : -0.9s }
139
+ .lds-spinner div : nth-child (4 ) { transform : rotate (90deg ); animation-delay : -0.8s }
140
+ .lds-spinner div : nth-child (5 ) { transform : rotate (120deg ); animation-delay : -0.7s }
141
+ .lds-spinner div : nth-child (6 ) { transform : rotate (150deg ); animation-delay : -0.6s }
142
+ .lds-spinner div : nth-child (7 ) { transform : rotate (180deg ); animation-delay : -0.5s }
143
+ .lds-spinner div : nth-child (8 ) { transform : rotate (210deg ); animation-delay : -0.4s }
144
+ .lds-spinner div : nth-child (9 ) { transform : rotate (240deg ); animation-delay : -0.3s }
145
+ .lds-spinner div : nth-child (10 ) { transform : rotate (270deg ); animation-delay : -0.2s }
146
+ .lds-spinner div : nth-child (11 ) { transform : rotate (300deg ); animation-delay : -0.1s }
147
+ .lds-spinner div : nth-child (12 ) { transform : rotate (330deg ); animation-delay : 0s }
148
+ @keyframes lds-spinner { 0% { opacity : 1 } 100% { opacity : 0 } }
149
+
150
+ .continue-message { opacity : 0 ; animation : 1s ease-in 10s 1 normal forwards fade-in; margin-top : 1em }
151
+ @keyframes fade-in { from { opacity : 0 } to { opacity : 1 } }
152
+ </ style >
153
+ </ head >
154
+ < body >
155
+ < div id ="container ">
156
+ < div class ="lds-spinner "> < div > </ div > < div > </ div > < div > </ div > < div > </ div > < div > </ div > < div > </ div > < div > </ div > < div > </ div > < div > </ div > < div > </ div > < div > </ div > < div > </ div > </ div >
157
+ < div class ="continue-message "> < a href ="${ nextPath } " id ="cl "> Continue</ a > </ div >
158
+ </ div >
159
+ </ body >
160
+ </ html >
161
+ ` ;
128
162
} catch ( err ) {
129
163
if ( redirect . isRedirect ( err ) ) {
130
164
throw err ;
0 commit comments