diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2021-01-13 09:12:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-13 09:12:55 +0100 |
commit | 1ea7da819e5bfae7b443ed722c18c4165d101439 (patch) | |
tree | 17cea3786dfb3a59a2ad5559de9ebf106a0440a2 /client/src/app/shared/shared-main/account/account.model.ts | |
parent | 75dd1b641f987e1e09dbaa3329e08c6e98a858f3 (diff) | |
download | PeerTube-1ea7da819e5bfae7b443ed722c18c4165d101439.tar.gz PeerTube-1ea7da819e5bfae7b443ed722c18c4165d101439.tar.zst PeerTube-1ea7da819e5bfae7b443ed722c18c4165d101439.zip |
add ability to remove one's avatar for account and channels (#3467)
* add ability to remove one's avatar for account and channels
* add ability to remove one's avatar for account and channels
* only display avatar edition options after input change
Diffstat (limited to 'client/src/app/shared/shared-main/account/account.model.ts')
-rw-r--r-- | client/src/app/shared/shared-main/account/account.model.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-main/account/account.model.ts b/client/src/app/shared/shared-main/account/account.model.ts index b3dc6cfe5..b71a893d1 100644 --- a/client/src/app/shared/shared-main/account/account.model.ts +++ b/client/src/app/shared/shared-main/account/account.model.ts | |||
@@ -44,6 +44,11 @@ export class Account extends Actor implements ServerAccount { | |||
44 | this.updateComputedAttributes() | 44 | this.updateComputedAttributes() |
45 | } | 45 | } |
46 | 46 | ||
47 | resetAvatar () { | ||
48 | this.avatar = null | ||
49 | this.avatarUrl = Account.GET_DEFAULT_AVATAR_URL() | ||
50 | } | ||
51 | |||
47 | private updateComputedAttributes () { | 52 | private updateComputedAttributes () { |
48 | this.avatarUrl = Account.GET_ACTOR_AVATAR_URL(this) | 53 | this.avatarUrl = Account.GET_ACTOR_AVATAR_URL(this) |
49 | } | 54 | } |