connection lost banner

if there is no connection to the home server

Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
Timo K
2023-06-09 19:18:30 +02:00
parent 062802b3e9
commit 14a32c0fb3
7 changed files with 135 additions and 6 deletions

View File

@@ -45,6 +45,12 @@ class DependencyLoadStates {
export class Initializer {
private static internalInstance: Initializer;
private isInitialized = false;
public static isInitialized(): boolean {
return Boolean(Initializer.internalInstance?.isInitialized);
}
public static initBeforeReact() {
// this maybe also needs to return a promise in the future,
// if we have to do async inits before showing the loading screen
@@ -223,6 +229,7 @@ export class Initializer {
if (this.loadStates.allDepsAreLoaded()) {
// resolve if there is no dependency that is not loaded
resolve();
this.isInitialized = true;
}
}
private initPromise: Promise<void> | null;