special display case for logged-out users to display download in watch page
This commit is contained in:
parent
9a42363291
commit
6863f814b0
|
@ -108,10 +108,23 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<ng-container *ngIf="!isUserLoggedIn()">
|
||||||
|
<button
|
||||||
|
*ngIf="isVideoDownloadable()" class="action-button action-button-save"
|
||||||
|
(click)="showDownloadModal()" (keydown.enter)="showDownloadModal()"
|
||||||
|
>
|
||||||
|
<my-global-icon iconName="download" aria-hidden="true"></my-global-icon>
|
||||||
|
<span class="icon-text d-none d-sm-inline" i18n>DOWNLOAD</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<my-video-download #videoDownloadModal></my-video-download>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="isUserLoggedIn()">
|
||||||
<my-video-actions-dropdown
|
<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"
|
||||||
(videoRemoved)="onVideoRemoved()" (modalOpened)="onModalOpened()"
|
(videoRemoved)="onVideoRemoved()" (modalOpened)="onModalOpened()"
|
||||||
></my-video-actions-dropdown>
|
></my-video-actions-dropdown>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="video-info-likes-dislikes-bar-outer-container">
|
<div class="video-info-likes-dislikes-bar-outer-container">
|
||||||
|
|
|
@ -28,6 +28,7 @@ import { environment } from '../../../environments/environment'
|
||||||
import { VideoShareComponent } from './modal/video-share.component'
|
import { VideoShareComponent } from './modal/video-share.component'
|
||||||
import { VideoSupportComponent } from './modal/video-support.component'
|
import { VideoSupportComponent } from './modal/video-support.component'
|
||||||
import { VideoWatchPlaylistComponent } from './video-watch-playlist.component'
|
import { VideoWatchPlaylistComponent } from './video-watch-playlist.component'
|
||||||
|
import { VideoDownloadComponent } from '@app/shared/shared-video-miniature'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-video-watch',
|
selector: 'my-video-watch',
|
||||||
|
@ -41,6 +42,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
@ViewChild('videoShareModal') videoShareModal: VideoShareComponent
|
@ViewChild('videoShareModal') videoShareModal: VideoShareComponent
|
||||||
@ViewChild('videoSupportModal') videoSupportModal: VideoSupportComponent
|
@ViewChild('videoSupportModal') videoSupportModal: VideoSupportComponent
|
||||||
@ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent
|
@ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent
|
||||||
|
@ViewChild('videoDownloadModal') videoDownloadModal: VideoDownloadComponent
|
||||||
|
|
||||||
player: any
|
player: any
|
||||||
playerElement: HTMLVideoElement
|
playerElement: HTMLVideoElement
|
||||||
|
@ -201,6 +203,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
this.completeDescriptionShown = false
|
this.completeDescriptionShown = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showDownloadModal () {
|
||||||
|
this.videoDownloadModal.show(this.video, this.videoCaptions)
|
||||||
|
}
|
||||||
|
|
||||||
|
isVideoDownloadable () {
|
||||||
|
return this.video && this.video instanceof VideoDetails && this.video.downloadEnabled
|
||||||
|
}
|
||||||
|
|
||||||
loadCompleteDescription () {
|
loadCompleteDescription () {
|
||||||
this.descriptionLoading = true
|
this.descriptionLoading = true
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user