|
|
@ -31,6 +31,7 @@ export default class GlobalApi { |
|
|
|
load_stages = new Stages(); |
|
|
|
|
|
|
|
constructor() { |
|
|
|
document.title = "Факты 13"; |
|
|
|
} |
|
|
|
|
|
|
|
async fillThis(value) { |
|
|
@ -78,6 +79,7 @@ export default class GlobalApi { |
|
|
|
|
|
|
|
async load() { |
|
|
|
this.loading = true; |
|
|
|
document.title = `Загрузка - Факты 13`; |
|
|
|
await Promise.all( |
|
|
|
[this.fillThis('statistic'), |
|
|
|
this.fillThis('uniq'), |
|
|
@ -85,12 +87,14 @@ export default class GlobalApi { |
|
|
|
this.admin.load(this.load_stages), |
|
|
|
this.player.load(this.load_stages)] |
|
|
|
).then(() => { |
|
|
|
console.log("end loading"); |
|
|
|
console.log("[Loader] success end"); |
|
|
|
this.loading = false; |
|
|
|
document.title = `Факты 13`; |
|
|
|
}).catch(() => { |
|
|
|
this.loading = false; |
|
|
|
this.failed = true; |
|
|
|
console.log("some error in loading"); |
|
|
|
document.title = `Факты 13 УМЕРЛИ`; |
|
|
|
console.log("[Loader] some error in loading"); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|