diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-14 09:31:41 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:51 +0100 |
commit | 1e1265b36c09df1465aa2b4866815c957b6a532e (patch) | |
tree | 0ac1b7398c1c941fb653fd27fe037fadae24871d /client/src/app/videos/shared | |
parent | 8e6964874990d5ee9d3703be71c6ab4617b9ce20 (diff) | |
download | PeerTube-1e1265b36c09df1465aa2b4866815c957b6a532e.tar.gz PeerTube-1e1265b36c09df1465aa2b4866815c957b6a532e.tar.zst PeerTube-1e1265b36c09df1465aa2b4866815c957b6a532e.zip |
Make the client compile too
Diffstat (limited to 'client/src/app/videos/shared')
-rw-r--r-- | client/src/app/videos/shared/video-details.model.ts | 6 | ||||
-rw-r--r-- | client/src/app/videos/shared/video.model.ts | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/client/src/app/videos/shared/video-details.model.ts b/client/src/app/videos/shared/video-details.model.ts index 84f96a25f..f4ae64dc1 100644 --- a/client/src/app/videos/shared/video-details.model.ts +++ b/client/src/app/videos/shared/video-details.model.ts | |||
@@ -10,7 +10,7 @@ import { | |||
10 | } from '../../../../../shared' | 10 | } from '../../../../../shared' |
11 | 11 | ||
12 | export class VideoDetails extends Video implements VideoDetailsServerModel { | 12 | export class VideoDetails extends Video implements VideoDetailsServerModel { |
13 | author: string | 13 | account: string |
14 | by: string | 14 | by: string |
15 | createdAt: Date | 15 | createdAt: Date |
16 | updatedAt: Date | 16 | updatedAt: Date |
@@ -71,7 +71,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { | |||
71 | } | 71 | } |
72 | 72 | ||
73 | isRemovableBy (user: AuthUser) { | 73 | isRemovableBy (user: AuthUser) { |
74 | return user && this.isLocal === true && (this.author === user.username || user.hasRight(UserRight.REMOVE_ANY_VIDEO)) | 74 | return user && this.isLocal === true && (this.account === user.username || user.hasRight(UserRight.REMOVE_ANY_VIDEO)) |
75 | } | 75 | } |
76 | 76 | ||
77 | isBlackistableBy (user: AuthUser) { | 77 | isBlackistableBy (user: AuthUser) { |
@@ -79,6 +79,6 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { | |||
79 | } | 79 | } |
80 | 80 | ||
81 | isUpdatableBy (user: AuthUser) { | 81 | isUpdatableBy (user: AuthUser) { |
82 | return user && this.isLocal === true && user.username === this.author | 82 | return user && this.isLocal === true && user.username === this.account |
83 | } | 83 | } |
84 | } | 84 | } |
diff --git a/client/src/app/videos/shared/video.model.ts b/client/src/app/videos/shared/video.model.ts index 7f2871032..2cad4a04e 100644 --- a/client/src/app/videos/shared/video.model.ts +++ b/client/src/app/videos/shared/video.model.ts | |||
@@ -2,7 +2,7 @@ import { Video as VideoServerModel } from '../../../../../shared' | |||
2 | import { User } from '../../shared' | 2 | import { User } from '../../shared' |
3 | 3 | ||
4 | export class Video implements VideoServerModel { | 4 | export class Video implements VideoServerModel { |
5 | author: string | 5 | account: string |
6 | by: string | 6 | by: string |
7 | createdAt: Date | 7 | createdAt: Date |
8 | updatedAt: Date | 8 | updatedAt: Date |
@@ -32,8 +32,8 @@ export class Video implements VideoServerModel { | |||
32 | dislikes: number | 32 | dislikes: number |
33 | nsfw: boolean | 33 | nsfw: boolean |
34 | 34 | ||
35 | private static createByString (author: string, podHost: string) { | 35 | private static createByString (account: string, podHost: string) { |
36 | return author + '@' + podHost | 36 | return account + '@' + podHost |
37 | } | 37 | } |
38 | 38 | ||
39 | private static createDurationString (duration: number) { | 39 | private static createDurationString (duration: number) { |
@@ -52,7 +52,7 @@ export class Video implements VideoServerModel { | |||
52 | absoluteAPIUrl = window.location.origin | 52 | absoluteAPIUrl = window.location.origin |
53 | } | 53 | } |
54 | 54 | ||
55 | this.author = hash.author | 55 | this.account = hash.account |
56 | this.createdAt = new Date(hash.createdAt.toString()) | 56 | this.createdAt = new Date(hash.createdAt.toString()) |
57 | this.categoryLabel = hash.categoryLabel | 57 | this.categoryLabel = hash.categoryLabel |
58 | this.category = hash.category | 58 | this.category = hash.category |
@@ -80,7 +80,7 @@ export class Video implements VideoServerModel { | |||
80 | this.dislikes = hash.dislikes | 80 | this.dislikes = hash.dislikes |
81 | this.nsfw = hash.nsfw | 81 | this.nsfw = hash.nsfw |
82 | 82 | ||
83 | this.by = Video.createByString(hash.author, hash.podHost) | 83 | this.by = Video.createByString(hash.account, hash.podHost) |
84 | } | 84 | } |
85 | 85 | ||
86 | isVideoNSFWForUser (user: User) { | 86 | isVideoNSFWForUser (user: User) { |