From 6ec1b66cc8adc51dfceeb5fce647faa3144ece99 Mon Sep 17 00:00:00 2001 From: Grigory Vodyanov Date: Sun, 26 Jul 2026 22:53:03 +0200 Subject: [PATCH] fix(ContactDetailsAvatar): tabbing Signed-off-by: Grigory Vodyanov --- .../ContactDetails/ContactDetailsAvatar.vue | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/components/ContactDetails/ContactDetailsAvatar.vue b/src/components/ContactDetails/ContactDetailsAvatar.vue index b71cf53c8..68ac0e89f 100644 --- a/src/components/ContactDetails/ContactDetailsAvatar.vue +++ b/src/components/ContactDetails/ContactDetailsAvatar.vue @@ -30,7 +30,7 @@ :url="photoUrl" class="contact-header-avatar__photo" /> - +

{{ t('contacts', 'Crop contact photo') }}

{ + reader.onload = async (e) => { try { if (typeof e.target.result === 'object') { const data = Buffer.from(e.target.result, 'binary') - if (this.processPicture(data)) { - return - } - - throw new Error('Wrong image mimetype') + // processPicture shows its own error on an invalid mimetype + await this.processPicture(data) } } catch (error) { logger.error(error) @@ -503,7 +501,7 @@ export default { const data = Buffer.from(response.data, 'binary') - this.processPicture(data) + await this.processPicture(data) } catch (error) { showError(t('contacts', 'Error while processing the picture.')) logger.error(error)