This commit is contained in:
Satsuki Yanagi
2019-07-17 13:28:27 +09:00
committed by syuilo
parent eaebb95827
commit 9ca36021b0
4 changed files with 57 additions and 0 deletions

View File

@ -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')
});
}
});
},

View File

@ -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']
});
}
});
};

View File

@ -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']
});
}
});
};