Improvements to UI in web logged-out views (#1341)

* Add LoggedOutLayout for desktop/tablet web

* Avoid screen flash in the transition to onboarding

* Fix comment
This commit is contained in:
Paul Frazee 2023-08-30 17:55:01 -07:00 committed by GitHub
parent a498acab6e
commit 04992f14f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 239 additions and 120 deletions

View file

@ -109,13 +109,8 @@ export class CreateAccountModel {
this.setError('')
this.setIsProcessing(true)
// open the onboarding screens after the session is created
const sessionReadySub = this.rootStore.onSessionReady(() => {
sessionReadySub.remove()
this.rootStore.onboarding.start()
})
try {
this.rootStore.onboarding.start() // start now to avoid flashing the wrong view
await this.rootStore.session.createAccount({
service: this.serviceUrl,
email: this.email,
@ -125,7 +120,7 @@ export class CreateAccountModel {
})
track('Create Account')
} catch (e: any) {
sessionReadySub.remove()
this.rootStore.onboarding.skip() // undo starting the onboard
let errMsg = e.toString()
if (e instanceof ComAtprotoServerCreateAccount.InvalidInviteCodeError) {
errMsg =