mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-11-24 17:06:20 -05:00
add back loading screen
This commit is contained in:
parent
9e48e6ce95
commit
9d05ce5efa
1 changed files with 10 additions and 1 deletions
|
|
@ -151,6 +151,16 @@ export default {
|
|||
// calculate percentage stabilized
|
||||
this.loadingProgress = Math.floor((event.iterations / event.total) * 100);
|
||||
|
||||
// hide loading once stabilized at least 50%
|
||||
if(this.loadingProgress >= 50){
|
||||
this.isLoading = false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// hide loading when stabilized
|
||||
this.network.on("stabilized", () => {
|
||||
this.isLoading = false;
|
||||
});
|
||||
|
||||
// update network
|
||||
|
|
@ -158,7 +168,6 @@ export default {
|
|||
|
||||
// stabilise the network a bit after first load
|
||||
this.network.stabilize();
|
||||
this.isLoading = false;
|
||||
|
||||
// auto update network
|
||||
this.reloadInterval = setInterval(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue