Reduce max display size for background in branding
This commit is contained in:
@@ -34,13 +34,8 @@ async function onSubmit() {
|
||||
if (newBackground) {
|
||||
const [error] = await brandingModel.setBackground(newBackground);
|
||||
if (error) {
|
||||
// TODO fetch() returns no proper status if entity is too large ??
|
||||
// if (error.status === 413) {
|
||||
backgroundError.value = 'Image is too large';
|
||||
busy.value = false;
|
||||
// } else {
|
||||
// return console.error(error);
|
||||
// }
|
||||
backgroundError.value = error.body ? error.body.message : 'Internal error';
|
||||
busy.value = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -92,7 +87,7 @@ onMounted(async () => {
|
||||
|
||||
<FormGroup>
|
||||
<label class="control-label">{{ $t('branding.backgroundImage') }}</label>
|
||||
<ImagePicker :src="backgroundUrl" @changed="onBackgroundChanged" fallback-src="/img/background-image-placeholder.svg" :max-size="1280"/>
|
||||
<ImagePicker :src="backgroundUrl" @changed="onBackgroundChanged" fallback-src="/img/background-image-placeholder.svg" display-height="200px" :max-size="1280"/>
|
||||
<div class="has-error" v-if="backgroundError">{{ backgroundError }}</div>
|
||||
</FormGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user