mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 19:14:16 +00:00
fix set locations on events
This commit is contained in:
parent
9f3a538492
commit
0fa964414b
@ -95,18 +95,13 @@ class App extends React.Component {
|
|||||||
"new_session": async () => {
|
"new_session": async () => {
|
||||||
await this.flushState()
|
await this.flushState()
|
||||||
await this.initialization()
|
await this.initialization()
|
||||||
|
|
||||||
if (window.location.pathname == "/login") {
|
|
||||||
window.app.setLocation(this.beforeLoginLocation ?? "/main")
|
|
||||||
this.beforeLoginLocation = null
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"destroyed_session": async () => {
|
"destroyed_session": async () => {
|
||||||
await this.flushState()
|
await this.flushState()
|
||||||
app.eventBus.emit("forceToLogin")
|
app.eventBus.emit("forceToLogin")
|
||||||
},
|
},
|
||||||
"forceToLogin": () => {
|
"forceToLogin": () => {
|
||||||
app.setLocation("/main")
|
window.app.setLocation("/main")
|
||||||
app.eventBus.emit("app.createLogin")
|
app.eventBus.emit("app.createLogin")
|
||||||
},
|
},
|
||||||
"invalid_session": async (error) => {
|
"invalid_session": async (error) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user