diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-05-27 17:25:52 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-05-27 17:25:52 +0200 |
commit | ccf6ed16f1eeb05b77103bd44bc06ccbbbba9bdd (patch) | |
tree | 1765f48824be934e0be07e8a987a9513c58ba3da /client/app/videos/shared/video.model.ts | |
parent | 41a2aee38cf812510010da09de9bae53590ec119 (diff) | |
download | PeerTube-ccf6ed16f1eeb05b77103bd44bc06ccbbbba9bdd.tar.gz PeerTube-ccf6ed16f1eeb05b77103bd44bc06ccbbbba9bdd.tar.zst PeerTube-ccf6ed16f1eeb05b77103bd44bc06ccbbbba9bdd.zip |
Do not prefix private attributes
Diffstat (limited to 'client/app/videos/shared/video.model.ts')
-rw-r--r-- | client/app/videos/shared/video.model.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/app/videos/shared/video.model.ts b/client/app/videos/shared/video.model.ts index eec537c9e..2b018ad86 100644 --- a/client/app/videos/shared/video.model.ts +++ b/client/app/videos/shared/video.model.ts | |||
@@ -11,7 +11,7 @@ export class Video { | |||
11 | by: string; | 11 | by: string; |
12 | duration: string; | 12 | duration: string; |
13 | 13 | ||
14 | private static createDurationString(duration: number): string { | 14 | private static createDurationString(duration: number) { |
15 | const minutes = Math.floor(duration / 60); | 15 | const minutes = Math.floor(duration / 60); |
16 | const seconds = duration % 60; | 16 | const seconds = duration % 60; |
17 | const minutes_padding = minutes >= 10 ? '' : '0'; | 17 | const minutes_padding = minutes >= 10 ? '' : '0'; |
@@ -20,7 +20,7 @@ export class Video { | |||
20 | return minutes_padding + minutes.toString() + ':' + seconds_padding + seconds.toString(); | 20 | return minutes_padding + minutes.toString() + ':' + seconds_padding + seconds.toString(); |
21 | } | 21 | } |
22 | 22 | ||
23 | private static createByString(author: string, podUrl: string): string { | 23 | private static createByString(author: string, podUrl: string) { |
24 | let [ host, port ] = podUrl.replace(/^https?:\/\//, '').split(':'); | 24 | let [ host, port ] = podUrl.replace(/^https?:\/\//, '').split(':'); |
25 | 25 | ||
26 | if (port === '80' || port === '443') { | 26 | if (port === '80' || port === '443') { |
@@ -57,7 +57,7 @@ export class Video { | |||
57 | this.by = Video.createByString(hash.author, hash.podUrl); | 57 | this.by = Video.createByString(hash.author, hash.podUrl); |
58 | } | 58 | } |
59 | 59 | ||
60 | isRemovableBy(user): boolean { | 60 | isRemovableBy(user) { |
61 | return this.isLocal === true && user && this.author === user.username; | 61 | return this.isLocal === true && user && this.author === user.username; |
62 | } | 62 | } |
63 | } | 63 | } |