summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorSatsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>2019-07-17 13:28:27 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-07-17 13:28:27 +0900
commit9ca36021b05b448f969568fa6cb1118b70cb4230 (patch)
treec801596449a2ef336fd308bafcdf255095e15184 /src/client
parentUpdate README.md [AUTOGEN] (#5163) (diff)
downloadsharkey-9ca36021b05b448f969568fa6cb1118b70cb4230.tar.gz
sharkey-9ca36021b05b448f969568fa6cb1118b70cb4230.tar.bz2
sharkey-9ca36021b05b448f969568fa6cb1118b70cb4230.zip
Fix #5172 (#5174)
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/common/views/components/settings/profile.vue23
-rw-r--r--src/client/app/desktop/api/update-avatar.ts15
-rw-r--r--src/client/app/desktop/api/update-banner.ts15
3 files changed, 53 insertions, 0 deletions
diff --git a/src/client/app/common/views/components/settings/profile.vue b/src/client/app/common/views/components/settings/profile.vue
index a22fd6df98..52ec8ceda3 100644
--- a/src/client/app/common/views/components/settings/profile.vue
+++ b/src/client/app/common/views/components/settings/profile.vue
@@ -265,6 +265,29 @@ export default Vue.extend({
text: this.$t('saved')
});
}
+ }).catch(err => {
+ this.saving = false;
+ switch(err.id) {
+ case 'f419f9f8-2f4d-46b1-9fb4-49d3a2fd7191':
+ this.$root.dialog({
+ type: 'error',
+ title: this.$t('unable-to-process'),
+ text: this.$t('avatar-not-an-image')
+ });
+ break;
+ case '75aedb19-2afd-4e6d-87fc-67941256fa60':
+ this.$root.dialog({
+ type: 'error',
+ title: this.$t('unable-to-process'),
+ text: this.$t('banner-not-an-image')
+ });
+ break;
+ default:
+ this.$root.dialog({
+ type: 'error',
+ text: this.$t('unable-to-process')
+ });
+ }
});
},
diff --git a/src/client/app/desktop/api/update-avatar.ts b/src/client/app/desktop/api/update-avatar.ts
index a095491b69..dad720827b 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..79d130f94b 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']
+ });
+ }
});
};