aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-02-15 11:39:45 +0100
committerChocobozzz <me@florianbigard.com>2023-02-15 11:54:17 +0100
commit0e76f30abb22bea8ab123902d6b3bf168f9a65c2 (patch)
tree2b372b3b76dbac68b9b091f8f293b98b8c2dceea /client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
parent6a7cea15271cf30c4b06c7981bff5201978337e8 (diff)
downloadPeerTube-0e76f30abb22bea8ab123902d6b3bf168f9a65c2.tar.gz
PeerTube-0e76f30abb22bea8ab123902d6b3bf168f9a65c2.tar.zst
PeerTube-0e76f30abb22bea8ab123902d6b3bf168f9a65c2.zip
Try to prevent layout shift with redundancy stats
Diffstat (limited to 'client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts')
-rw-r--r--client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
index b31c5b35e..d7676ab09 100644
--- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
+++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
@@ -26,6 +26,9 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
26 26
27 noRedundancies = false 27 noRedundancies = false
28 28
29 // Prevent layout shift for redundancy stats
30 dataLoaded = false
31
29 private bytesPipe: BytesPipe 32 private bytesPipe: BytesPipe
30 33
31 constructor ( 34 constructor (
@@ -163,6 +166,8 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
163 } 166 }
164 167
165 protected reloadDataInternal () { 168 protected reloadDataInternal () {
169 this.dataLoaded = false
170
166 const options = { 171 const options = {
167 pagination: this.pagination, 172 pagination: this.pagination,
168 sort: this.sort, 173 sort: this.sort,
@@ -174,9 +179,11 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
174 next: resultList => { 179 next: resultList => {
175 this.videoRedundancies = resultList.data 180 this.videoRedundancies = resultList.data
176 this.totalRecords = resultList.total 181 this.totalRecords = resultList.total
182
183 this.dataLoaded = true
177 }, 184 },
178 185
179 error: err => this.notifier.error(err.message) 186 error: err => this.notifier.error(err.message),
180 }) 187 })
181 } 188 }
182 189