refactor: demo params

This commit is contained in:
Mo
2023-03-03 10:26:38 -06:00
parent c663482ea3
commit 2a567ad052
7 changed files with 14 additions and 172 deletions

View File

@@ -426,6 +426,10 @@ export class WebApplication extends SNApplication implements WebApplicationInter
this.getViewControllerManager().accountMenuController.setShow(true)
}
hideAccountMenu(): void {
this.getViewControllerManager().accountMenuController.setShow(false)
}
geDefaultEditorIdentifier(currentTag?: SNTag): EditorIdentifier {
return (
currentTag?.preferences?.editorIdentifier ||

View File

@@ -90,7 +90,11 @@ const ApplicationView: FunctionComponent<Props> = ({ application, mainApplicatio
return
}
void application.user.populateSessionFromDemoShareToken(token)
const status = application.status.addMessage('Preparing demo...')
void application.user.populateSessionFromDemoShareToken(token).then(() => {
application.status.removeMessage(status)
application.hideAccountMenu()
})
}, [application])
const onAppLaunch = useCallback(() => {