improve session.created transitions

This commit is contained in:
srgooglo 2022-10-11 13:26:30 +02:00
parent b39ffa5327
commit f626325cae

View File

@ -148,6 +148,9 @@ class App extends React.Component {
await this.sessionController.logout() await this.sessionController.logout()
}, },
"session.created": async () => { "session.created": async () => {
app.eventBus.emit("layout.animations.fadeOut")
app.eventBus.emit("layout.render.lock")
await this.flushState() await this.flushState()
await this.initialization() await this.initialization()
@ -155,6 +158,9 @@ class App extends React.Component {
if (window.location.pathname === "/login") { if (window.location.pathname === "/login") {
app.setLocation("/") app.setLocation("/")
} }
app.eventBus.emit("layout.render.unlock")
app.eventBus.emit("layout.animations.fadeIn")
}, },
"session.destroyed": async () => { "session.destroyed": async () => {
await this.flushState() await this.flushState()