|
|
|
@ -38,7 +38,15 @@ export default class AppState extends TypedEventEmitter<AppEvents> {
@@ -38,7 +38,15 @@ export default class AppState extends TypedEventEmitter<AppEvents> {
|
|
|
|
|
when(() => !this.tokenStore.accessToken.isValid, this.checkToken); |
|
|
|
|
this.sprinklersRpc.start(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
document.addEventListener("visibilitychange", this.onPageFocus); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onPageFocus = () => { |
|
|
|
|
if (document.visibilityState === "visible") { |
|
|
|
|
this.sprinklersRpc.reconnect(); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
@computed |
|
|
|
|
get isLoggedIn() { |
|
|
|
|