aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-settings
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-11-23 10:45:42 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-12-03 10:15:49 +0100
commitd4132d3f56b392a2e4e632db59e6644e4851228e (patch)
treebe903734aa9ce3d669c40656a0f81bd3e9c7978c /client/src/app/+my-account/my-account-settings
parent4a54a93941d1c095bf249331df799c51e39c3774 (diff)
downloadPeerTube-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.ts8
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 @@
1import { ViewportScroller } from '@angular/common' 1import { ViewportScroller } from '@angular/common'
2import { HttpErrorResponse } from '@angular/common/http'
2import { AfterViewChecked, Component, OnInit } from '@angular/core' 3import { AfterViewChecked, Component, OnInit } from '@angular/core'
3import { AuthService, Notifier, User, UserService } from '@app/core' 4import { AuthService, Notifier, User, UserService } from '@app/core'
5import { 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}