mirror of https://github.com/Chocobozzz/PeerTube
Try to prevent layout shift with redundancy stats
parent
6a7cea1527
commit
0e76f30abb
|
@ -86,7 +86,7 @@
|
|||
</p-table>
|
||||
|
||||
|
||||
<div class="redundancies-charts" *ngIf="isDisplayingRemoteVideos()">
|
||||
<div class="redundancies-charts" *ngIf="isDisplayingRemoteVideos() && dataLoaded">
|
||||
<h6 i18n>Enabled strategies stats</h6>
|
||||
|
||||
<div class="chart-blocks">
|
||||
|
|
|
@ -26,6 +26,9 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
|
|||
|
||||
noRedundancies = false
|
||||
|
||||
// Prevent layout shift for redundancy stats
|
||||
dataLoaded = false
|
||||
|
||||
private bytesPipe: BytesPipe
|
||||
|
||||
constructor (
|
||||
|
@ -163,6 +166,8 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
|
|||
}
|
||||
|
||||
protected reloadDataInternal () {
|
||||
this.dataLoaded = false
|
||||
|
||||
const options = {
|
||||
pagination: this.pagination,
|
||||
sort: this.sort,
|
||||
|
@ -174,9 +179,11 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
|
|||
next: resultList => {
|
||||
this.videoRedundancies = resultList.data
|
||||
this.totalRecords = resultList.total
|
||||
|
||||
this.dataLoaded = true
|
||||
},
|
||||
|
||||
error: err => this.notifier.error(err.message)
|
||||
error: err => this.notifier.error(err.message),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue