diff options
author | kimsible <kimsible@users.noreply.github.com> | 2020-11-18 19:20:05 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-25 11:12:06 +0100 |
commit | c418d483004dfbae9ea38d54aa1577db46d34a8a (patch) | |
tree | c4fd4ec790c6e5d6bc44e887090a8286e10fffd2 /client/src/app/shared/shared-main/account/actor.model.ts | |
parent | 18490b07650d77d7fe376970b749af5a8c672fd6 (diff) | |
download | PeerTube-c418d483004dfbae9ea38d54aa1577db46d34a8a.tar.gz PeerTube-c418d483004dfbae9ea38d54aa1577db46d34a8a.tar.zst PeerTube-c418d483004dfbae9ea38d54aa1577db46d34a8a.zip |
Add new default different avatar for channel and account
Diffstat (limited to 'client/src/app/shared/shared-main/account/actor.model.ts')
-rw-r--r-- | client/src/app/shared/shared-main/account/actor.model.ts | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/client/src/app/shared/shared-main/account/actor.model.ts b/client/src/app/shared/shared-main/account/actor.model.ts index 950e256ff..8222c9769 100644 --- a/client/src/app/shared/shared-main/account/actor.model.ts +++ b/client/src/app/shared/shared-main/account/actor.model.ts | |||
@@ -24,12 +24,6 @@ export abstract class Actor implements ActorServer { | |||
24 | 24 | ||
25 | return absoluteAPIUrl + actor.avatar.path | 25 | return absoluteAPIUrl + actor.avatar.path |
26 | } | 26 | } |
27 | |||
28 | return this.GET_DEFAULT_AVATAR_URL() | ||
29 | } | ||
30 | |||
31 | static GET_DEFAULT_AVATAR_URL () { | ||
32 | return window.location.origin + '/client/assets/images/default-avatar.png' | ||
33 | } | 27 | } |
34 | 28 | ||
35 | static CREATE_BY_STRING (accountName: string, host: string, forceHostname = false) { | 29 | static CREATE_BY_STRING (accountName: string, host: string, forceHostname = false) { |
@@ -61,17 +55,5 @@ export abstract class Actor implements ActorServer { | |||
61 | 55 | ||
62 | this.avatar = hash.avatar | 56 | this.avatar = hash.avatar |
63 | this.isLocal = Actor.IS_LOCAL(this.host) | 57 | this.isLocal = Actor.IS_LOCAL(this.host) |
64 | |||
65 | this.updateComputedAttributes() | ||
66 | } | ||
67 | |||
68 | updateAvatar (newAvatar: Avatar) { | ||
69 | this.avatar = newAvatar | ||
70 | |||
71 | this.updateComputedAttributes() | ||
72 | } | ||
73 | |||
74 | private updateComputedAttributes () { | ||
75 | this.avatarUrl = Actor.GET_ACTOR_AVATAR_URL(this) | ||
76 | } | 58 | } |
77 | } | 59 | } |