@@ -126,7 +126,7 @@ function onTokenLoginCompleted() {
126126 window . location . href = formatted ;
127127}
128128
129- export async function loadApp ( fragParams : { } , acceptBrowser : boolean ) {
129+ export async function loadApp ( fragParams : { } ) {
130130 // XXX: the way we pass the path to the worker script from webpack via html in body's dataset is a hack
131131 // but alternatives seem to require changing the interface to passing Workers to js-sdk
132132 const vectorIndexeddbWorkerScript = document . body . dataset . vectorIndexeddbWorkerScript ;
@@ -148,45 +148,35 @@ export async function loadApp(fragParams: {}, acceptBrowser: boolean) {
148148
149149 const urlWithoutQuery = window . location . protocol + '//' + window . location . host + window . location . pathname ;
150150 console . log ( "Vector starting at " + urlWithoutQuery ) ;
151- if ( acceptBrowser ) {
152- platform . startUpdater ( ) ;
153-
154- try {
155- // Don't bother loading the app until the config is verified
156- const config = await verifyServerConfig ( ) ;
157- const MatrixChat = sdk . getComponent ( 'structures.MatrixChat' ) ;
158- return < MatrixChat
159- onNewScreen = { onNewScreen }
160- makeRegistrationUrl = { makeRegistrationUrl }
161- ConferenceHandler = { VectorConferenceHandler }
162- config = { config }
163- realQueryParams = { params }
164- startingFragmentQueryParams = { fragParams }
165- enableGuest = { ! config . disable_guests }
166- onTokenLoginCompleted = { onTokenLoginCompleted }
167- initialScreenAfterLogin = { getScreenFromLocation ( window . location ) }
168- defaultDeviceDisplayName = { platform . getDefaultDeviceDisplayName ( ) }
169- /> ;
170- } catch ( err ) {
171- console . error ( err ) ;
172-
173- let errorMessage = err . translatedMessage
174- || _t ( "Unexpected error preparing the app. See console for details." ) ;
175- errorMessage = < span > { errorMessage } </ span > ;
176-
177- // Like the compatibility page, AWOOOOOGA at the user
178- const GenericErrorPage = sdk . getComponent ( "structures.GenericErrorPage" ) ;
179- return < GenericErrorPage message = { errorMessage } title = { _t ( "Your Riot is misconfigured" ) } /> ;
180- }
181- } else {
182- console . error ( "Browser is missing required features." ) ;
183- // take to a different landing page to AWOOOOOGA at the user
184- const CompatibilityPage = sdk . getComponent ( "structures.CompatibilityPage" ) ;
185- return < CompatibilityPage onAccept = { function ( ) {
186- if ( window . localStorage ) window . localStorage . setItem ( 'mx_accepts_unsupported_browser' , true ) ;
187- console . log ( "User accepts the compatibility risks." ) ;
188- loadApp ( ) ;
189- } } /> ;
151+
152+ platform . startUpdater ( ) ;
153+
154+ try {
155+ // Don't bother loading the app until the config is verified
156+ const config = await verifyServerConfig ( ) ;
157+ const MatrixChat = sdk . getComponent ( 'structures.MatrixChat' ) ;
158+ return < MatrixChat
159+ onNewScreen = { onNewScreen }
160+ makeRegistrationUrl = { makeRegistrationUrl }
161+ ConferenceHandler = { VectorConferenceHandler }
162+ config = { config }
163+ realQueryParams = { params }
164+ startingFragmentQueryParams = { fragParams }
165+ enableGuest = { ! config . disable_guests }
166+ onTokenLoginCompleted = { onTokenLoginCompleted }
167+ initialScreenAfterLogin = { getScreenFromLocation ( window . location ) }
168+ defaultDeviceDisplayName = { platform . getDefaultDeviceDisplayName ( ) }
169+ /> ;
170+ } catch ( err ) {
171+ console . error ( err ) ;
172+
173+ let errorMessage = err . translatedMessage
174+ || _t ( "Unexpected error preparing the app. See console for details." ) ;
175+ errorMessage = < span > { errorMessage } </ span > ;
176+
177+ // Like the compatibility page, AWOOOOOGA at the user
178+ const GenericErrorPage = sdk . getComponent ( "structures.GenericErrorPage" ) ;
179+ return < GenericErrorPage message = { errorMessage } title = { _t ( "Your Riot is misconfigured" ) } /> ;
190180 }
191181}
192182
0 commit comments