Reduce max display size for background in branding

This commit is contained in:
Johannes Zellner
2025-04-07 14:58:51 +02:00
parent 4297665c93
commit 4bf13f3c70
+3 -8
View File
@@ -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>