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-main | |
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-main')
-rw-r--r-- | client/src/app/shared/shared-main/video/video.model.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-main/video/video.model.ts b/client/src/app/shared/shared-main/video/video.model.ts index 04e7bd717..adb6e884f 100644 --- a/client/src/app/shared/shared-main/video/video.model.ts +++ b/client/src/app/shared/shared-main/video/video.model.ts | |||
@@ -203,4 +203,14 @@ export class Video implements VideoServerModel { | |||
203 | canBeDuplicatedBy (user: AuthUser) { | 203 | canBeDuplicatedBy (user: AuthUser) { |
204 | return user && this.isLocal === false && user.hasRight(UserRight.MANAGE_VIDEOS_REDUNDANCIES) | 204 | return user && this.isLocal === false && user.hasRight(UserRight.MANAGE_VIDEOS_REDUNDANCIES) |
205 | } | 205 | } |
206 | |||
207 | getExactNumberOfViews () { | ||
208 | if (this.views < 1000) return '' | ||
209 | |||
210 | if (this.isLive) { | ||
211 | return $localize`${this.views} viewers` | ||
212 | } | ||
213 | |||
214 | return $localize`${this.views} views` | ||
215 | } | ||
206 | } | 216 | } |