1
0
Fork 0
peertube/client/src/app/videos/+video-watch/video-watch.component.html

196 lines
7.0 KiB
HTML
Raw Normal View History

<div *ngIf="error" class="row">
<div class="alert alert-danger">
The video load seems to be abnormally long.
<ul>
2017-11-15 10:00:25 +00:00
<li>Maybe the server {{ video.serverHost }} is down :(</li>
<li>
If not, you can report an issue on
<a href="https://github.com/Chocobozzz/PeerTube/issues" title="Report an issue">
https://github.com/Chocobozzz/PeerTube/issues
</a>
</li>
</ul>
</div>
</div>
<div class="row">
2017-04-21 16:26:09 +00:00
<!-- We need the video container for videojs so we just hide it -->
2017-12-05 09:44:11 +00:00
<div [hidden]="videoNotFound" id="video-container">
<video id="video-element" class="video-js vjs-peertube-skin"></video>
</div>
2017-04-21 16:26:09 +00:00
<div *ngIf="videoNotFound" id="video-not-found">Video not found :'(</div>
2016-03-14 12:50:19 +00:00
</div>
2016-04-29 12:18:14 +00:00
<!-- Video information -->
<div *ngIf="video !== null" id="video-info">
2017-04-21 14:40:45 +00:00
<div class="row video-name-views">
2017-05-01 16:05:28 +00:00
<div class="col-xs-8 col-md-8 video-name">
2017-04-21 14:40:45 +00:00
{{ video.name }}
</div>
2017-05-01 16:05:28 +00:00
<div class="col-xs-4 col-md-4 pull-right video-views">
2017-04-21 14:40:45 +00:00
{{ video.views}} views
</div>
2017-04-21 14:40:45 +00:00
</div>
2017-04-21 14:40:45 +00:00
<div class="row video-small-blocks">
2017-11-14 08:31:41 +00:00
<div class="col-xs-5 col-xs-3 col-md-3 video-small-block video-small-block-account">
<a class="option" title="Access to all videos of this user" [routerLink]="['/videos/list', { field: 'account', search: video.account }]">
2017-07-06 15:18:10 +00:00
<span class="glyphicon glyphicon-user"></span>
<span class="video-small-block-text">{{ video.by }}</span>
2017-04-21 14:40:45 +00:00
</a>
</div>
2017-03-08 20:35:43 +00:00
2017-05-01 16:05:28 +00:00
<div class="col-xs-2 col-md-3 video-small-block video-small-block-share">
2017-04-21 14:40:45 +00:00
<a class="option" (click)="showShareModal()" title="Share the video">
<span class="glyphicon glyphicon-share"></span>
2017-11-06 10:46:11 +00:00
<span class="hidden-xs video-small-block-text">Share</span>
2017-04-21 14:40:45 +00:00
</a>
</div>
2016-11-08 20:11:57 +00:00
2017-05-01 16:05:28 +00:00
<div class="col-xs-2 col-md-3 video-small-block video-small-block-more">
2017-04-21 14:40:45 +00:00
<div class="video-small-block-dropdown" dropdown dropup="true" placement="right">
<a class="option" title="Access to more options" dropdownToggle>
<span class="glyphicon glyphicon-option-horizontal"></span>
2017-11-06 10:46:11 +00:00
<span class="hidden-xs video-small-block-text">More</span>
2017-04-21 14:40:45 +00:00
</a>
2017-02-26 18:59:51 +00:00
2017-04-12 20:00:17 +00:00
<ul *dropdownMenu class="dropdown-menu" id="more-menu" role="menu" aria-labelledby="single-button">
<li *ngIf="canUserUpdateVideo()" role="menuitem">
<a class="dropdown-item" title="Update this video" href="#" [routerLink]="[ '/videos/edit', video.uuid ]">
<span class="glyphicon glyphicon-pencil"></span> Update
</a>
</li>
2017-01-20 18:22:15 +00:00
<li role="menuitem">
<a class="dropdown-item" title="Download the video" href="#" (click)="showDownloadModal($event)">
<span class="glyphicon glyphicon-download-alt"></span> Download
2017-02-26 18:59:51 +00:00
</a>
</li>
<li *ngIf="isUserLoggedIn()" role="menuitem">
<a class="dropdown-item" title="Report this video" href="#" (click)="showReportModal($event)">
2017-01-20 18:22:15 +00:00
<span class="glyphicon glyphicon-alert"></span> Report
</a>
</li>
Add ability for an administrator to remove any video (#61) * Add ability for an admin to remove every video on the pod. * Server: add BlacklistedVideos relation. * Server: Insert in BlacklistedVideos relation upon deletion of a video. * Server: Modify BlacklistedVideos schema to add Pod id information. * Server: Moving insertion of a blacklisted video from the `afterDestroy` hook into the process of deletion of a video. To avoid inserting a video when it is removed on its origin pod. When a video is removed on its origin pod, the `afterDestroy` hook is fire, but no request is made on the delete('/:videoId') interface. Hence, we insert into `BlacklistedVideos` only on request on delete('/:videoId') (if requirements for insertion are met). * Server: Add removeVideoFromBlacklist hook on deletion of a video. We are going to proceed in another way :). We will add a new route : /:videoId/blacklist to blacklist a video. We do not blacklist a video upon its deletion now (to distinguish a video blacklist from a regular video delete) When we blacklist a video, the video remains in the DB, so we don't have any concern about its update. It just doesn't appear in the video list. When we remove a video, we then have to remove it from the blacklist too. We could also remove a video from the blacklist to 'unremove' it and make it appear again in the video list (will be another feature). * Server: Add handler for new route post(/:videoId/blacklist) * Client: Add isBlacklistable method * Client: Update isRemovableBy method. * Client: Move 'Delete video' feature from the video-list to the video-watch module. * Server: Exclude blacklisted videos from the video list * Server: Use findAll() in BlacklistedVideos.list() method * Server: Fix addVideoToBlacklist function. * Client: Add blacklist feature. * Server: Use JavaScript Standard Style. * Server: In checkUserCanDeleteVideo, move the callback call inside the db callback function * Server: Modify BlacklistVideo relation * Server: Modifiy Videos methods. * Server: Add checkVideoIsBlacklistable method * Server: Rewrite addVideoToBlacklist method * Server: Fix checkVideoIsBlacklistable method * Server: Add return to addVideoToBlacklist method
2017-04-26 19:22:10 +00:00
2017-04-26 19:42:36 +00:00
<li *ngIf="isVideoRemovable()" role="menuitem">
<a class="dropdown-item" title="Delete this video" href="#" (click)="removeVideo($event)">
<span class="glyphicon glyphicon-remove"></span> Delete
</a>
</li>
<li *ngIf="isVideoBlacklistable()" role="menuitem">
<a class="dropdown-item" title="Blacklist this video" href="#" (click)="blacklistVideo($event)">
<span class="glyphicon glyphicon-eye-close"></span> Blacklist
</a>
</li>
2017-01-20 18:22:15 +00:00
</ul>
</div>
</div>
2017-05-01 16:05:28 +00:00
<div class="col-xs-3 col-md-3 video-small-block video-small-block-rating">
2017-04-21 14:40:45 +00:00
<div class="video-small-block-like">
<span
class="glyphicon glyphicon-thumbs-up" title="Like this video"
[ngClass]="{ 'interactive': isUserLoggedIn(), 'activated': userRating === 'like' }" (click)="setLike()"
></span>
2017-02-26 18:59:51 +00:00
2017-04-21 14:40:45 +00:00
<span class="video-small-block-text">
{{ video.likes }}
</span>
</div>
2017-04-21 14:40:45 +00:00
<div class="video-small-block-dislike">
<span
class="glyphicon glyphicon-thumbs-down" title="Dislike this video"
[ngClass]="{ 'interactive': isUserLoggedIn(), 'activated': userRating === 'dislike' }" (click)="setDislike()"
></span>
2017-03-22 20:15:55 +00:00
2017-04-21 14:40:45 +00:00
<span class="video-small-block-text">
{{ video.dislikes }}
</span>
</div>
2017-03-27 19:11:37 +00:00
</div>
</div>
2017-04-21 14:40:45 +00:00
<div class="row video-details">
2017-05-01 16:05:28 +00:00
<div class="video-details-date-description col-xs-8 col-md-9">
2017-04-21 14:40:45 +00:00
<div class="video-details-date">
Published on {{ video.createdAt | date:'short' }}
</div>
<div class="video-details-description" [innerHTML]="videoHTMLDescription"></div>
<div class="video-details-description-more" *ngIf="completeDescriptionShown === false && video.description.length === 250" (click)="showMoreDescription()">
Show more
<span *ngIf="descriptionLoading === false" class="glyphicon glyphicon-menu-down"></span>
<my-loader class="description-loading" [loading]="descriptionLoading"></my-loader>
</div>
<div *ngIf="completeDescriptionShown === true" (click)="showLessDescription()" class="video-details-description-more">
Show less
<span *ngIf="descriptionLoading === false" class="glyphicon glyphicon-menu-up"></span>
</div>
2017-04-07 12:57:05 +00:00
</div>
2017-05-01 16:05:28 +00:00
<div class="video-details-attributes col-xs-4 col-md-3">
2017-10-31 10:52:52 +00:00
<div class="video-details-attribute">
<span class="video-details-attribute-label">
Privacy:
</span>
<span class="video-details-attribute-value">
{{ video.privacyLabel }}
</span>
</div>
2017-04-21 14:40:45 +00:00
<div class="video-details-attribute">
<span class="video-details-attribute-label">
Category:
</span>
<span class="video-details-attribute-value">
{{ video.categoryLabel }}
</span>
</div>
<div class="video-details-attribute">
<span class="video-details-attribute-label">
Licence:
</span>
<span class="video-details-attribute-value">
{{ video.licenceLabel }}
</span>
</div>
<div class="video-details-attribute">
<span class="video-details-attribute-label">
Language:
</span>
<span class="video-details-attribute-value">
{{ video.languageLabel }}
</span>
</div>
2017-04-23 19:57:08 +00:00
<div class="video-details-attribute">
<span class="video-details-attribute-label">
Tags:
</span>
<div class="video-details-tags">
<a *ngFor="let tag of video.tags" [routerLink]="['/videos/list', { field: 'tags', search: tag }]" class="label label-primary">
{{ tag }}
</a>
</div>
</div>
</div>
</div>
</div>
2017-04-12 20:00:17 +00:00
<ng-template [ngIf]="video !== null">
2017-01-20 18:22:15 +00:00
<my-video-share #videoShareModal [video]="video"></my-video-share>
<my-video-download #videoDownloadModal [video]="video"></my-video-download>
2017-01-20 18:22:15 +00:00
<my-video-report #videoReportModal [video]="video"></my-video-report>
2017-04-12 20:00:17 +00:00
</ng-template>