diff options
author | Chocobozzz <me@florianbigard.com> | 2022-09-13 12:00:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-09-13 12:00:13 +0200 |
commit | 367a9dc69975a0db01962dbb7106635fb8eb1696 (patch) | |
tree | edcae09eb37dc50012c66c229a7e0d3fa23a2084 /client/src/app/+admin/overview/videos | |
parent | 9f244885f0974730c488233827b63ff0ff08319e (diff) | |
download | PeerTube-367a9dc69975a0db01962dbb7106635fb8eb1696.tar.gz PeerTube-367a9dc69975a0db01962dbb7106635fb8eb1696.tar.zst PeerTube-367a9dc69975a0db01962dbb7106635fb8eb1696.zip |
Don't display remove file icon in some cases
Diffstat (limited to 'client/src/app/+admin/overview/videos')
-rw-r--r-- | client/src/app/+admin/overview/videos/video-list.component.html | 2 | ||||
-rw-r--r-- | client/src/app/+admin/overview/videos/video-list.component.ts | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/client/src/app/+admin/overview/videos/video-list.component.html b/client/src/app/+admin/overview/videos/video-list.component.html index 06b9ab347..14bbb55e9 100644 --- a/client/src/app/+admin/overview/videos/video-list.component.html +++ b/client/src/app/+admin/overview/videos/video-list.component.html | |||
@@ -109,6 +109,7 @@ | |||
109 | {{ file.resolution.label }}: {{ file.size | bytes: 1 }} | 109 | {{ file.resolution.label }}: {{ file.size | bytes: 1 }} |
110 | 110 | ||
111 | <my-global-icon | 111 | <my-global-icon |
112 | *ngIf="canRemoveOneFile(video)" | ||
112 | i18n-ngbTooltip ngbTooltip="Delete this file" iconName="delete" role="button" | 113 | i18n-ngbTooltip ngbTooltip="Delete this file" iconName="delete" role="button" |
113 | (click)="removeVideoFile(video, file, 'webtorrent')" | 114 | (click)="removeVideoFile(video, file, 'webtorrent')" |
114 | ></my-global-icon> | 115 | ></my-global-icon> |
@@ -124,6 +125,7 @@ | |||
124 | {{ file.resolution.label }}: {{ file.size | bytes: 1 }} | 125 | {{ file.resolution.label }}: {{ file.size | bytes: 1 }} |
125 | 126 | ||
126 | <my-global-icon | 127 | <my-global-icon |
128 | *ngIf="canRemoveOneFile(video)" | ||
127 | i18n-ngbTooltip ngbTooltip="Delete this file" iconName="delete" role="button" | 129 | i18n-ngbTooltip ngbTooltip="Delete this file" iconName="delete" role="button" |
128 | (click)="removeVideoFile(video, file, 'hls')" | 130 | (click)="removeVideoFile(video, file, 'hls')" |
129 | ></my-global-icon> | 131 | ></my-global-icon> |
diff --git a/client/src/app/+admin/overview/videos/video-list.component.ts b/client/src/app/+admin/overview/videos/video-list.component.ts index ed7ec54a1..cb693ce12 100644 --- a/client/src/app/+admin/overview/videos/video-list.component.ts +++ b/client/src/app/+admin/overview/videos/video-list.component.ts | |||
@@ -166,6 +166,10 @@ export class VideoListComponent extends RestTable implements OnInit { | |||
166 | return video.files.length !== 0 | 166 | return video.files.length !== 0 |
167 | } | 167 | } |
168 | 168 | ||
169 | canRemoveOneFile (video: Video) { | ||
170 | return video.canRemoveOneFile(this.authUser) | ||
171 | } | ||
172 | |||
169 | getFilesSize (video: Video) { | 173 | getFilesSize (video: Video) { |
170 | let files = video.files | 174 | let files = video.files |
171 | 175 | ||