mirror of https://github.com/Chocobozzz/PeerTube
Fix hidden delete button for original file
parent
4373b2d566
commit
4df22f9e47
|
@ -128,11 +128,7 @@
|
|||
<li>
|
||||
<a title="Download this file" i18n-title [href]="getDownloadUrl(video, video.videoSource.fileDownloadUrl)">{{ video.videoSource.inputFilename }}</a>: {{ video.videoSource.size | bytes: 1 }}
|
||||
|
||||
<button
|
||||
*ngIf="canRemoveOneFile(video)" class="border-0 p-0"
|
||||
i18n-title title="Delete this file"
|
||||
(click)="removeVideoSourceFile(video)"
|
||||
>
|
||||
<button class="border-0 p-0" i18n-title title="Delete this file" (click)="removeVideoSourceFile(video)">
|
||||
<my-global-icon iconName="delete"></my-global-icon>
|
||||
</button>
|
||||
</li>
|
||||
|
|
|
@ -159,13 +159,13 @@ export class VideoListComponent extends RestTable <Video> implements OnInit {
|
|||
{
|
||||
label: $localize`Delete HLS files`,
|
||||
handler: videos => this.removeVideoFiles(videos, 'hls'),
|
||||
isDisplayed: videos => videos.every(v => v.canRemoveFiles(this.authUser)),
|
||||
isDisplayed: videos => videos.every(v => v.canRemoveAllHLSOrWebFiles(this.authUser)),
|
||||
iconName: 'delete'
|
||||
},
|
||||
{
|
||||
label: $localize`Delete Web Video files`,
|
||||
handler: videos => this.removeVideoFiles(videos, 'web-videos'),
|
||||
isDisplayed: videos => videos.every(v => v.canRemoveFiles(this.authUser)),
|
||||
isDisplayed: videos => videos.every(v => v.canRemoveAllHLSOrWebFiles(this.authUser)),
|
||||
iconName: 'delete'
|
||||
}
|
||||
],
|
||||
|
|
|
@ -265,7 +265,7 @@ export class Video implements VideoServerModel {
|
|||
getAllFiles(this).length > 1
|
||||
}
|
||||
|
||||
canRemoveFiles (user: AuthUser) {
|
||||
canRemoveAllHLSOrWebFiles (user: AuthUser) {
|
||||
return this.isLocal &&
|
||||
user && user.hasRight(UserRight.MANAGE_VIDEO_FILES) &&
|
||||
this.state.id !== VideoState.TO_TRANSCODE &&
|
||||
|
|
|
@ -243,7 +243,7 @@ export class VideoActionsDropdownComponent implements OnChanges {
|
|||
}
|
||||
|
||||
canRemoveVideoFiles () {
|
||||
return this.video.canRemoveFiles(this.user)
|
||||
return this.video.canRemoveAllHLSOrWebFiles(this.user)
|
||||
}
|
||||
|
||||
canRunTranscoding () {
|
||||
|
|
Loading…
Reference in New Issue