]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/+video-watch/video-watch.component.html
refactor subscribe button and comment-add for visitor-interact UX (#1100)
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / video-watch.component.html
CommitLineData
191764f3 1<div class="root-row row">
897ec54d 2 <!-- We need the video container for videojs so we just hide it -->
4a7591e1 3 <div id="video-element-wrapper">
6d88de72
C
4 <div *ngIf="remoteServerDown" class="remote-server-down">
5 Sorry, but this video is not available because the remote instance is not responding.
6 <br />
7 Please try again later.
8 </div>
d1992b93 9 </div>
897ec54d 10
516df59b
C
11 <div i18n class="alert alert-warning" *ngIf="isVideoToImport()">
12 The video is being imported, it will be available when the import is finished.
13 </div>
14
bbe0f064 15 <div i18n class="alert alert-warning" *ngIf="isVideoToTranscode()">
2186386c
C
16 The video is being transcoded, it may not work properly.
17 </div>
18
bbe0f064 19 <div i18n class="alert alert-info" *ngIf="hasVideoScheduledPublication()">
191764f3
C
20 This video will be published on {{ video.scheduledUpdate.updateAt | date: 'full' }}.
21 </div>
22
23 <div class="alert alert-danger" *ngIf="video?.blacklisted">
24 <div class="blacklisted-label" i18n>This video is blacklisted.</div>
25 {{ video.blacklistedReason }}
bbe0f064
C
26 </div>
27
20206dfb 28 <!-- Video information -->
2303a803 29 <div *ngIf="video" class="margin-content video-bottom">
2d9fea16 30 <div class="row fullWidth">
3b766e18 31 <div class="col-12 col-lg-auto video-info">
2d9fea16
RK
32 <div class="video-info-first-row">
33 <div>
34 <div class="d-block d-sm-none"> <!-- only shown on small devices, has its conterpart for larger viewports below -->
f845c683 35 <h1 class="video-info-name">{{ video.name }}</h1>
2d9fea16
RK
36
37 <div i18n class="video-info-date-views">
38 Published {{ video.publishedAt | myFromNow }} - {{ video.views | myNumberFormatter }} views
39 </div>
20206dfb 40 </div>
2d3741d6 41
2d9fea16
RK
42 <div class="d-flex justify-content-between align-items-sm-end">
43 <div class="d-none d-sm-block">
f845c683 44 <h1 class="video-info-name">{{ video.name }}</h1>
2d9fea16
RK
45
46 <div i18n class="video-info-date-views">
47 Published {{ video.publishedAt | myFromNow }} - {{ video.views | myNumberFormatter }} views
48 </div>
2d3741d6 49 </div>
2d9fea16
RK
50
51 <div class="video-actions-rates">
52 <div class="video-actions fullWidth justify-content-end">
53 <div
54 *ngIf="isUserLoggedIn()" [ngClass]="{ 'activated': userRating === 'like' }" (click)="setLike()"
55 class="action-button action-button-like" role="button" [attr.aria-pressed]="userRating === 'like'"
56 >
57 <span class="icon icon-like" i18n-title title="Like this video" ></span>
58 </div>
2d3741d6 59
2d9fea16
RK
60 <div
61 *ngIf="isUserLoggedIn()" [ngClass]="{ 'activated': userRating === 'dislike' }" (click)="setDislike()"
62 class="action-button action-button-dislike" role="button" [attr.aria-pressed]="userRating === 'dislike'"
63 >
64 <span class="icon icon-dislike" i18n-title title="Dislike this video"></span>
65 </div>
2d3741d6 66
2d9fea16
RK
67 <div *ngIf="video.support" (click)="showSupportModal()" class="action-button action-button-support">
68 <span class="icon icon-support"></span>
69 <span class="icon-text" i18n>Support</span>
70 </div>
2d3741d6 71
2d9fea16
RK
72 <div (click)="showShareModal()" class="action-button action-button-share" role="button">
73 <span class="icon icon-share"></span>
74 <span class="icon-text" i18n>Share</span>
75 </div>
2d3741d6 76
2d9fea16
RK
77 <div class="action-more" ngbDropdown placement="top" role="button">
78 <div class="action-button" ngbDropdownToggle role="button">
79 <span class="icon icon-more"></span>
80 </div>
2d3741d6 81
2d9fea16
RK
82 <div ngbDropdownMenu>
83 <a class="dropdown-item" i18n-title title="Download the video" href="#" (click)="showDownloadModal($event)">
84 <span class="icon icon-download"></span> <ng-container i18n>Download</ng-container>
85 </a>
2d3741d6 86
2d9fea16
RK
87 <a *ngIf="isUserLoggedIn()" class="dropdown-item" i18n-title title="Report this video" href="#" (click)="showReportModal($event)">
88 <span class="icon icon-alert"></span> <ng-container i18n>Report</ng-container>
89 </a>
2d3741d6 90
2d9fea16
RK
91 <a *ngIf="isVideoUpdatable()" class="dropdown-item" i18n-title title="Update this video" href="#" [routerLink]="[ '/videos/update', video.uuid ]">
92 <span class="icon icon-edit"></span> <ng-container i18n>Update</ng-container>
93 </a>
2d3741d6 94
2d9fea16
RK
95 <a *ngIf="isVideoBlacklistable()" class="dropdown-item" i18n-title title="Blacklist this video" href="#" (click)="showBlacklistModal($event)">
96 <span class="icon icon-blacklist"></span> <ng-container i18n>Blacklist</ng-container>
97 </a>
2d3741d6 98
2d9fea16
RK
99 <a *ngIf="isVideoUnblacklistable()" class="dropdown-item" i18n-title title="Unblacklist this video" href="#" (click)="unblacklistVideo($event)">
100 <span class="icon icon-unblacklist"></span> <ng-container i18n>Unblacklist</ng-container>
101 </a>
2d3741d6 102
2d9fea16
RK
103 <a *ngIf="isVideoRemovable()" class="dropdown-item" i18n-title title="Delete this video" href="#" (click)="removeVideo($event)">
104 <span class="icon icon-delete"></span> <ng-container i18n>Delete</ng-container>
105 </a>
106 </div>
107 </div>
108 </div>
2d3741d6 109
2d9fea16
RK
110 <div
111 class="video-info-likes-dislikes-bar"
112 *ngIf="video.likes !== 0 || video.dislikes !== 0"
8ff3f883 113 [ngbTooltip]="likesBarTooltipText"
2d9fea16 114 placement="bottom"
8ff3f883 115 >
2d9fea16
RK
116 <div class="likes-bar" [ngStyle]="{ 'width.%': video.likesPercent }"></div>
117 </div>
118 </div>
1f788f20 119 </div>
6a9e1d42 120
07fa4c97 121
2d9fea16 122 <div class="pt-3 border-top video-info-channel">
21131ac1 123 <a [routerLink]="[ '/video-channels', video.byVideoChannel ]" i18n-title title="Go the channel page">
2d9fea16 124 {{ video.channel.displayName }}
6e07c3de 125
2d9fea16
RK
126 <img [src]="video.videoChannelAvatarUrl" alt="Video channel avatar" />
127 </a>
1f788f20 128
660d11e9 129 <my-subscribe-button #subscribeButton [videoChannel]="video.channel" size="small"></my-subscribe-button>
2d9fea16 130 </div>
63347a0f 131
2d9fea16
RK
132 <div class="video-info-by">
133 <a [routerLink]="[ '/accounts', video.byAccount ]" i18n-title title="Go to the account page">
134 <span i18n>By {{ video.byAccount }}</span>
135 <img [src]="video.accountAvatarUrl" alt="Account avatar" />
136 </a>
2d9fea16
RK
137 </div>
138 </div>
63347a0f 139
2d9fea16 140 </div>
26b7305a 141
2d9fea16
RK
142 <div class="video-info-description">
143 <div class="video-info-description-html" [innerHTML]="videoHTMLDescription"></div>
191764f3 144
2d9fea16
RK
145 <div class="video-info-description-more" *ngIf="completeDescriptionShown === false && video.description?.length >= 250" (click)="showMoreDescription()">
146 <ng-container i18n>Show more</ng-container>
147 <span *ngIf="descriptionLoading === false" class="glyphicon glyphicon-menu-down"></span>
148 <my-loader class="description-loading" [loading]="descriptionLoading"></my-loader>
1f788f20 149 </div>
d07137b9 150
2d9fea16
RK
151 <div *ngIf="completeDescriptionShown === true" (click)="showLessDescription()" class="video-info-description-more">
152 <ng-container i18n>Show less</ng-container>
153 <span *ngIf="descriptionLoading === false" class="glyphicon glyphicon-menu-up"></span>
1f788f20
C
154 </div>
155 </div>
09223546 156
2d9fea16
RK
157 <div class="video-attributes">
158 <div class="video-attribute">
159 <span i18n class="video-attribute-label">Privacy</span>
160 <span class="video-attribute-value">{{ video.privacy.label }}</span>
161 </div>
2de96f4d 162
2d9fea16
RK
163 <div class="video-attribute">
164 <span i18n class="video-attribute-label">Category</span>
165 <span *ngIf="!video.category.id" class="video-attribute-value">{{ video.category.label }}</span>
166 <a
167 *ngIf="video.category.id" class="video-attribute-value"
168 [routerLink]="[ '/search' ]" [queryParams]="{ categoryOneOf: [ video.category.id ] }"
169 >{{ video.category.label }}</a>
170 </div>
2de96f4d 171
2d9fea16
RK
172 <div class="video-attribute">
173 <span i18n class="video-attribute-label">Licence</span>
174 <span *ngIf="!video.licence.id" class="video-attribute-value">{{ video.licence.label }}</span>
175 <a
176 *ngIf="video.licence.id" class="video-attribute-value"
177 [routerLink]="[ '/search' ]" [queryParams]="{ licenceOneOf: [ video.licence.id ] }"
178 >{{ video.licence.label }}</a>
179 </div>
db216afd 180
2d9fea16
RK
181 <div class="video-attribute">
182 <span i18n class="video-attribute-label">Language</span>
183 <span *ngIf="!video.language.id" class="video-attribute-value">{{ video.language.label }}</span>
184 <a
185 *ngIf="video.language.id" class="video-attribute-value"
186 [routerLink]="[ '/search' ]" [queryParams]="{ languageOneOf: [ video.language.id ] }"
187 >{{ video.language.label }}</a>
188 </div>
fd45e8f4 189
2d9fea16
RK
190 <div class="video-attribute video-attribute-tags">
191 <span i18n class="video-attribute-label">Tags</span>
192 <a
193 *ngFor="let tag of getVideoTags()"
194 class="video-attribute-value" [routerLink]="[ '/search' ]" [queryParams]="{ tagsOneOf: [ tag ] }"
195 >{{ tag }}</a>
196 </div>
20206dfb 197 </div>
09223546 198
3b766e18
RK
199 <my-video-comments [video]="video" [user]="user"></my-video-comments>
200 </div>
201
8ff3f883 202 <my-recommended-videos [inputRecommendation]="{ uuid: video.uuid, tags: video.tags }" [user]="user"></my-recommended-videos>
d1992b93
C
203 </div>
204 </div>
8ff3f883 205
2b3b76ab 206 <div class="privacy-concerns" *ngIf="hasAlreadyAcceptedPrivacyConcern === false">
2b3b76ab 207 <div class="privacy-concerns-text">
2d9fea16 208 <strong i18n>Friendly Reminder: </strong>
989e526a 209 <ng-container i18n>
a54991da 210 the sharing system used for this video implies that some technical information about your system (such as a public IP address) can be sent to other peers.
989e526a 211 </ng-container>
78f912ed 212 <a i18n i18n-title title="Get more information" target="_blank" rel="noopener noreferrer" href="/about/peertube">More information</a>
2b3b76ab
C
213 </div>
214
989e526a 215 <div i18n class="privacy-concerns-okay" (click)="acceptedPrivacyConcern()">
2b3b76ab
C
216 OK
217 </div>
218 </div>
d1992b93 219
ad42bea3 220<ng-template [ngIf]="video !== null">
07fa4c97 221 <my-video-support #videoSupportModal [video]="video"></my-video-support>
4f8c0eb0 222 <my-video-share #videoShareModal [video]="video"></my-video-share>
a96aed15 223 <my-video-download #videoDownloadModal [video]="video"></my-video-download>
4f8c0eb0 224 <my-video-report #videoReportModal [video]="video"></my-video-report>
26b7305a 225 <my-video-blacklist #videoBlacklistModal [video]="video"></my-video-blacklist>
ad42bea3 226</ng-template>