diff options
Diffstat (limited to 'client/src/app/+my-account')
-rw-r--r-- | client/src/app/+my-account/my-account-settings/my-account-settings.component.html | 2 | ||||
-rw-r--r-- | client/src/app/+my-account/my-account-settings/my-account-settings.component.ts | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.html b/client/src/app/+my-account/my-account-settings/my-account-settings.component.html index 40505b92f..b0d2ec58d 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.html +++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.html | |||
@@ -3,7 +3,7 @@ | |||
3 | <div class="form-group col-12 col-lg-4 col-xl-3"></div> | 3 | <div class="form-group col-12 col-lg-4 col-xl-3"></div> |
4 | 4 | ||
5 | <div class="form-group col-12 col-lg-8 col-xl-9"> | 5 | <div class="form-group col-12 col-lg-8 col-xl-9"> |
6 | <my-actor-avatar-info [actor]="user.account" (avatarChange)="onAvatarChange($event)"></my-actor-avatar-info> | 6 | <my-actor-avatar-info [actor]="user.account" (avatarChange)="onAvatarChange($event)" (avatarDelete)="onAvatarDelete()"></my-actor-avatar-info> |
7 | </div> | 7 | </div> |
8 | </div> | 8 | </div> |
9 | 9 | ||
diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts index d5d019b35..c16368952 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts | |||
@@ -53,4 +53,17 @@ export class MyAccountSettingsComponent implements OnInit, AfterViewChecked { | |||
53 | }) | 53 | }) |
54 | ) | 54 | ) |
55 | } | 55 | } |
56 | |||
57 | onAvatarDelete () { | ||
58 | this.userService.deleteAvatar() | ||
59 | .subscribe( | ||
60 | data => { | ||
61 | this.notifier.success($localize`Avatar deleted.`) | ||
62 | |||
63 | this.user.updateAccountAvatar() | ||
64 | }, | ||
65 | |||
66 | (err: HttpErrorResponse) => this.notifier.error(err.message) | ||
67 | ) | ||
68 | } | ||
56 | } | 69 | } |