aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/shared-video-miniature/video-miniature.component.html6
-rw-r--r--client/src/app/shared/shared-video-miniature/video-miniature.component.ts6
2 files changed, 10 insertions, 2 deletions
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.html b/client/src/app/shared/shared-video-miniature/video-miniature.component.html
index a88b3bc9e..b323002e3 100644
--- a/client/src/app/shared/shared-video-miniature/video-miniature.component.html
+++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.html
@@ -26,9 +26,11 @@
26 <span class="video-miniature-created-at-views"> 26 <span class="video-miniature-created-at-views">
27 <my-date-toggle *ngIf="displayOptions.date" [date]="video.publishedAt"></my-date-toggle> 27 <my-date-toggle *ngIf="displayOptions.date" [date]="video.publishedAt"></my-date-toggle>
28 28
29 <span class="views"> 29 <span class="views" title="{{ getExactNumberOfViews() }}">
30 <ng-container *ngIf="displayOptions.date && displayOptions.views"> • </ng-container> 30 <ng-container *ngIf="displayOptions.date && displayOptions.views"> • </ng-container>
31 <ng-container i18n *ngIf="displayOptions.views">{video.views, plural, =1 {1 view} other {{{ video.views | myNumberFormatter }} views}}</ng-container> 31 <ng-container i18n *ngIf="displayOptions.views">
32 {video.views, plural, =1 {1 view} other {{{ video.views | myNumberFormatter }} views}}
33 </ng-container>
32 </span> 34 </span>
33 </span> 35 </span>
34 36
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
index cc5665ab1..e59255cf8 100644
--- a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
+++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
@@ -190,6 +190,12 @@ export class VideoMiniatureComponent implements OnInit {
190 return this.video.videoChannelAvatarUrl 190 return this.video.videoChannelAvatarUrl
191 } 191 }
192 192
193 getExactNumberOfViews () {
194 return (this.video.views >= 1000 && this.displayOptions.views)
195 ? `${this.video.views} ${this.video.isLive ? $localize`viewers` : $localize`views`}`
196 : ''
197 }
198
193 loadActions () { 199 loadActions () {
194 if (this.displayVideoActions) this.showActions = true 200 if (this.displayVideoActions) this.showActions = true
195 201