Only display availability hint in watch page
This commit is contained in:
parent
4e29a6f7ba
commit
3eba4fca2a
4 changed files with 8 additions and 5 deletions
|
@ -60,7 +60,7 @@
|
|||
|
||||
<td class="action-cell">
|
||||
<my-video-actions-dropdown
|
||||
placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" [displayOptions]="videoActionsOptions"
|
||||
placement="bottom auto" buttonDirection="horizontal" buttonStyled="true" [video]="video" [displayOptions]="videoActionsOptions"
|
||||
(videoRemoved)="reloadData()" (videoFilesRemoved)="reloadData()" (transcodingCreated)="reloadData()"
|
||||
></my-video-actions-dropdown>
|
||||
</td>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
<my-video-actions-dropdown
|
||||
[video]="video" [displayOptions]="videoDropdownDisplayOptions" [moreActions]="moreVideoActions"
|
||||
[buttonStyled]="true" buttonDirection="horizontal" (videoRemoved)="onVideoRemoved(video)"
|
||||
buttonStyled="true" buttonDirection="horizontal" (videoRemoved)="onVideoRemoved(video)"
|
||||
></my-video-actions-dropdown>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
|
|
@ -49,7 +49,8 @@
|
|||
|
||||
<ng-container *ngIf="isUserLoggedIn">
|
||||
<my-video-actions-dropdown
|
||||
placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" [videoCaptions]="videoCaptions"
|
||||
placement="bottom auto" buttonDirection="horizontal" buttonStyled="true" [video]="video" [videoCaptions]="videoCaptions"
|
||||
actionAvailabilityHint="true"
|
||||
[displayOptions]="videoActionsOptions" (videoRemoved)="onVideoRemoved()"
|
||||
></my-video-actions-dropdown>
|
||||
</ng-container>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { NgIf } from '@angular/common'
|
||||
import { Component, EventEmitter, Input, OnChanges, Output, ViewChild } from '@angular/core'
|
||||
import { Component, EventEmitter, Input, OnChanges, Output, ViewChild, booleanAttribute } from '@angular/core'
|
||||
import { AuthService, ConfirmService, Notifier, ScreenService, ServerService } from '@app/core'
|
||||
import { NgbDropdown, NgbDropdownAnchor, NgbDropdownMenu } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { VideoCaption } from '@peertube/peertube-models'
|
||||
|
@ -86,10 +86,11 @@ export class VideoActionsDropdownComponent implements OnChanges {
|
|||
}
|
||||
@Input() placement = 'left'
|
||||
@Input() moreActions: DropdownAction<{ video: Video }>[][] = []
|
||||
@Input({ transform: booleanAttribute }) actionAvailabilityHint = false
|
||||
|
||||
@Input() label: string
|
||||
|
||||
@Input() buttonStyled = false
|
||||
@Input({ transform: booleanAttribute }) buttonStyled = false
|
||||
@Input() buttonSize: DropdownButtonSize = 'normal'
|
||||
@Input() buttonDirection: DropdownDirection = 'vertical'
|
||||
|
||||
|
@ -378,6 +379,7 @@ export class VideoActionsDropdownComponent implements OnChanges {
|
|||
},
|
||||
iconName: 'download',
|
||||
ownerOrModeratorPrivilege: () => {
|
||||
if (!this.actionAvailabilityHint) return undefined
|
||||
if (this.isVideoDownloadableByAnonymous()) return undefined
|
||||
|
||||
return $localize`This option is visible only to you`
|
||||
|
|
Loading…
Reference in a new issue