From f3614a4b5b0fcf0f38da8f18335d125f0f86047f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Fri, 8 Sep 2023 11:39:24 +0200 Subject: [PATCH] [FIX] mail: smaller thumbnails in attachment list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, when showing list of attachments in a message or attachment box, the images were too big. This made it hard to see other content due to the big size of the images. This commit fixes the issue by reducing the size of image previews when in context of many attachments. When a message has a single image, it keeps showing a big preview of this image. Also slightly reduce size of images in attachment box, as they were also too big. closes odoo/odoo#134941 X-original-commit: cf2069e0f7cd36c4d2b3bcc79fdde7e0425e2e52 Signed-off-by: Sébastien Theys (seb) Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/core/common/message.xml | 2 +- addons/mail/static/src/core/web/chatter.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mail/static/src/core/common/message.xml b/addons/mail/static/src/core/common/message.xml index 2e4733baf5f..18f10088cca 100644 --- a/addons/mail/static/src/core/common/message.xml +++ b/addons/mail/static/src/core/common/message.xml @@ -110,7 +110,7 @@ t-if="message.attachments.length > 0" attachments="message.attachments.map((a) => a)" unlinkAttachment.bind="onClickAttachmentUnlink" - imagesHeight="300"/> + imagesHeight="message.attachments.length === 1 ? 300 : 75"/> diff --git a/addons/mail/static/src/core/web/chatter.xml b/addons/mail/static/src/core/web/chatter.xml index 2a56b5141ed..1065a043ab2 100644 --- a/addons/mail/static/src/core/web/chatter.xml +++ b/addons/mail/static/src/core/web/chatter.xml @@ -98,7 +98,7 @@