aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/follows/video-redundancies-list
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-26 10:27:02 +0200
committerChocobozzz <me@florianbigard.com>2023-05-26 10:27:02 +0200
commit4b70c278a960a8d43407f0039aa03d0b08b44f9c (patch)
treed82990de9c1075dc5357f5f2f03162381f1e2c87 /client/src/app/+admin/follows/video-redundancies-list
parenta4c49a17ea8b90c1522a9d0868de7186c7432592 (diff)
downloadPeerTube-4b70c278a960a8d43407f0039aa03d0b08b44f9c.tar.gz
PeerTube-4b70c278a960a8d43407f0039aa03d0b08b44f9c.tar.zst
PeerTube-4b70c278a960a8d43407f0039aa03d0b08b44f9c.zip
Automatic colspan for tables
Diffstat (limited to 'client/src/app/+admin/follows/video-redundancies-list')
-rw-r--r--client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html6
-rw-r--r--client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts6
2 files changed, 3 insertions, 9 deletions
diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html
index 2b52d3fd8..85b9d8913 100644
--- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html
+++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html
@@ -57,7 +57,7 @@
57 57
58 <ng-template pTemplate="rowexpansion" let-redundancy> 58 <ng-template pTemplate="rowexpansion" let-redundancy>
59 <tr *ngIf="redundancy.redundancies.files.length !== 0"> 59 <tr *ngIf="redundancy.redundancies.files.length !== 0">
60 <td class="expand-cell" [attr.colspan]="getColspan()"> 60 <td class="expand-cell" myAutoColspan>
61 <div *ngFor="let file of redundancy.redundancies.files" class="expansion-block"> 61 <div *ngFor="let file of redundancy.redundancies.files" class="expansion-block">
62 <my-video-redundancy-information [redundancyElement]="file"></my-video-redundancy-information> 62 <my-video-redundancy-information [redundancyElement]="file"></my-video-redundancy-information>
63 </div> 63 </div>
@@ -65,7 +65,7 @@
65 </tr> 65 </tr>
66 66
67 <tr *ngIf="redundancy.redundancies.streamingPlaylists.length !== 0"> 67 <tr *ngIf="redundancy.redundancies.streamingPlaylists.length !== 0">
68 <td class="expand-cell" [attr.colspan]="getColspan()"> 68 <td class="expand-cell" myAutoColspan>
69 <div *ngFor="let playlist of redundancy.redundancies.streamingPlaylists"> 69 <div *ngFor="let playlist of redundancy.redundancies.streamingPlaylists">
70 <my-video-redundancy-information [redundancyElement]="playlist"></my-video-redundancy-information> 70 <my-video-redundancy-information [redundancyElement]="playlist"></my-video-redundancy-information>
71 </div> 71 </div>
@@ -75,7 +75,7 @@
75 75
76 <ng-template pTemplate="emptymessage"> 76 <ng-template pTemplate="emptymessage">
77 <tr> 77 <tr>
78 <td colspan="6"> 78 <td myAutoColspan>
79 <div class="no-results"> 79 <div class="no-results">
80 <ng-container *ngIf="isDisplayingRemoteVideos()" i18n>Your instance doesn't mirror any video.</ng-container> 80 <ng-container *ngIf="isDisplayingRemoteVideos()" i18n>Your instance doesn't mirror any video.</ng-container>
81 <ng-container *ngIf="!isDisplayingRemoteVideos()" i18n>Your instance has no mirrored videos.</ng-container> 81 <ng-container *ngIf="!isDisplayingRemoteVideos()" i18n>Your instance has no mirrored videos.</ng-container>
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 d65467a4d..efcefd509 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
@@ -63,12 +63,6 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
63 }) 63 })
64 } 64 }
65 65
66 getColspan () {
67 if (this.isDisplayingRemoteVideos()) return 5
68
69 return 4
70 }
71
72 isDisplayingRemoteVideos () { 66 isDisplayingRemoteVideos () {
73 return this.displayType === 'remote-videos' 67 return this.displayType === 'remote-videos'
74 } 68 }