diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-11-23 10:45:42 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-12-03 10:15:49 +0100 |
commit | d4132d3f56b392a2e4e632db59e6644e4851228e (patch) | |
tree | be903734aa9ce3d669c40656a0f81bd3e9c7978c /client/src/app/+my-account/my-account-settings | |
parent | 4a54a93941d1c095bf249331df799c51e39c3774 (diff) | |
download | PeerTube-d4132d3f56b392a2e4e632db59e6644e4851228e.tar.gz PeerTube-d4132d3f56b392a2e4e632db59e6644e4851228e.tar.zst PeerTube-d4132d3f56b392a2e4e632db59e6644e4851228e.zip |
more explicit error messages for file uploads
Diffstat (limited to 'client/src/app/+my-account/my-account-settings')
-rw-r--r-- | client/src/app/+my-account/my-account-settings/my-account-settings.component.ts | 8 |
1 files changed, 7 insertions, 1 deletions
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 7ea4610d4..d5d019b35 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 | |||
@@ -1,6 +1,8 @@ | |||
1 | import { ViewportScroller } from '@angular/common' | 1 | import { ViewportScroller } from '@angular/common' |
2 | import { HttpErrorResponse } from '@angular/common/http' | ||
2 | import { AfterViewChecked, Component, OnInit } from '@angular/core' | 3 | import { AfterViewChecked, Component, OnInit } from '@angular/core' |
3 | import { AuthService, Notifier, User, UserService } from '@app/core' | 4 | import { AuthService, Notifier, User, UserService } from '@app/core' |
5 | import { uploadErrorHandler } from '@app/helpers' | ||
4 | 6 | ||
5 | @Component({ | 7 | @Component({ |
6 | selector: 'my-account-settings', | 8 | selector: 'my-account-settings', |
@@ -44,7 +46,11 @@ export class MyAccountSettingsComponent implements OnInit, AfterViewChecked { | |||
44 | this.user.updateAccountAvatar(data.avatar) | 46 | this.user.updateAccountAvatar(data.avatar) |
45 | }, | 47 | }, |
46 | 48 | ||
47 | err => this.notifier.error(err.message) | 49 | (err: HttpErrorResponse) => uploadErrorHandler({ |
50 | err, | ||
51 | name: $localize`avatar`, | ||
52 | notifier: this.notifier | ||
53 | }) | ||
48 | ) | 54 | ) |
49 | } | 55 | } |
50 | } | 56 | } |