diff options
Diffstat (limited to 'src/client/app/desktop/api')
| -rw-r--r-- | src/client/app/desktop/api/update-avatar.ts | 15 | ||||
| -rw-r--r-- | src/client/app/desktop/api/update-banner.ts | 15 |
2 files changed, 30 insertions, 0 deletions
diff --git a/src/client/app/desktop/api/update-avatar.ts b/src/client/app/desktop/api/update-avatar.ts index a095491b69..6b88b51ef1 100644 --- a/src/client/app/desktop/api/update-avatar.ts +++ b/src/client/app/desktop/api/update-avatar.ts @@ -83,6 +83,21 @@ export default ($root: any) => { }); return i; + }).catch(err => { + switch (err.id) { + case 'f419f9f8-2f4d-46b1-9fb4-49d3a2fd7191': + $root.dialog({ + type: 'error', + title: locale['desktop']['unable-to-process'], + text: locale['desktop']['invalid-filetype'] + }); + break; + default: + $root.dialog({ + type: 'error', + text: locale['desktop']['unable-to-process'] + }); + } }); }; diff --git a/src/client/app/desktop/api/update-banner.ts b/src/client/app/desktop/api/update-banner.ts index c23a325364..09632b1941 100644 --- a/src/client/app/desktop/api/update-banner.ts +++ b/src/client/app/desktop/api/update-banner.ts @@ -83,6 +83,21 @@ export default ($root: any) => { }); return i; + }).catch(err => { + switch (err.id) { + case '75aedb19-2afd-4e6d-87fc-67941256fa60': + $root.dialog({ + type: 'error', + title: locale['desktop']['unable-to-process'], + text: locale['desktop']['invalid-filetype'] + }); + break; + default: + $root.dialog({ + type: 'error', + text: locale['desktop']['unable-to-process'] + }); + } }); }; |