diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-27 15:57:38 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-11-27 15:57:38 +0100 |
commit | 4ec25ae825f8dee44d948b38d8216f9a239ff7b3 (patch) | |
tree | be3617c4060806c49e930af2f219e81640046388 /client/src/app/shared/shared-video-miniature | |
parent | 413b9729ee8218229a142dd5a79cd33d206b715f (diff) | |
download | PeerTube-4ec25ae825f8dee44d948b38d8216f9a239ff7b3.tar.gz PeerTube-4ec25ae825f8dee44d948b38d8216f9a239ff7b3.tar.zst PeerTube-4ec25ae825f8dee44d948b38d8216f9a239ff7b3.zip |
Refactor last PR
Diffstat (limited to 'client/src/app/shared/shared-video-miniature')
-rw-r--r-- | client/src/app/shared/shared-video-miniature/video-miniature.component.html | 2 | ||||
-rw-r--r-- | client/src/app/shared/shared-video-miniature/video-miniature.component.ts | 6 |
2 files changed, 1 insertions, 7 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 b323002e3..395a4df97 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,7 +26,7 @@ | |||
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" title="{{ getExactNumberOfViews() }}"> | 29 | <span class="views" [title]="video.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"> | 31 | <ng-container i18n *ngIf="displayOptions.views"> |
32 | {video.views, plural, =1 {1 view} other {{{ video.views | myNumberFormatter }} views}} | 32 | {video.views, plural, =1 {1 view} other {{{ video.views | myNumberFormatter }} views}} |
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 e59255cf8..cc5665ab1 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,12 +190,6 @@ 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 | |||
199 | loadActions () { | 193 | loadActions () { |
200 | if (this.displayVideoActions) this.showActions = true | 194 | if (this.displayVideoActions) this.showActions = true |
201 | 195 | ||