diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-24 15:10:54 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-24 15:13:19 +0200 |
commit | 0626e7af82e02f8a5bd1e74a7d4d8c916d073ceb (patch) | |
tree | 79b5befbc6a04c007e5919805f1514d065b30e11 /client/src/app/shared/account/account.model.ts | |
parent | b4d1af3dd8cdab2d58927e671d62194ca383cd75 (diff) | |
download | PeerTube-0626e7af82e02f8a5bd1e74a7d4d8c916d073ceb.tar.gz PeerTube-0626e7af82e02f8a5bd1e74a7d4d8c916d073ceb.tar.zst PeerTube-0626e7af82e02f8a5bd1e74a7d4d8c916d073ceb.zip |
Add account view
Diffstat (limited to 'client/src/app/shared/account/account.model.ts')
-rw-r--r-- | client/src/app/shared/account/account.model.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/client/src/app/shared/account/account.model.ts b/client/src/app/shared/account/account.model.ts index 0bdc76478..3d5176bdd 100644 --- a/client/src/app/shared/account/account.model.ts +++ b/client/src/app/shared/account/account.model.ts | |||
@@ -16,6 +16,21 @@ export class Account implements ServerAccount { | |||
16 | updatedAt: Date | 16 | updatedAt: Date |
17 | avatar: Avatar | 17 | avatar: Avatar |
18 | 18 | ||
19 | constructor (hash: ServerAccount) { | ||
20 | this.id = hash.id | ||
21 | this.uuid = hash.uuid | ||
22 | this.url = hash.url | ||
23 | this.name = hash.name | ||
24 | this.displayName = hash.displayName | ||
25 | this.description = hash.description | ||
26 | this.host = hash.host | ||
27 | this.followingCount = hash.followingCount | ||
28 | this.followersCount = hash.followersCount | ||
29 | this.createdAt = new Date(hash.createdAt.toString()) | ||
30 | this.updatedAt = new Date(hash.updatedAt.toString()) | ||
31 | this.avatar = hash.avatar | ||
32 | } | ||
33 | |||
19 | static GET_ACCOUNT_AVATAR_URL (account: Account) { | 34 | static GET_ACCOUNT_AVATAR_URL (account: Account) { |
20 | const absoluteAPIUrl = getAbsoluteAPIUrl() | 35 | const absoluteAPIUrl = getAbsoluteAPIUrl() |
21 | 36 | ||