From 062b67f289f7ed52f68c1a1157f3c842b30bdab0 Mon Sep 17 00:00:00 2001 From: Hamza Mahjoubi Date: Mon, 7 Oct 2024 15:29:41 +0200 Subject: [PATCH] fix:filepicker for contact avatar Signed-off-by: Hamza Mahjoubi --- src/components/ContactDetails/ContactDetailsAvatar.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/ContactDetails/ContactDetailsAvatar.vue b/src/components/ContactDetails/ContactDetailsAvatar.vue index 6677e7b6b..6a0f1f007 100644 --- a/src/components/ContactDetails/ContactDetailsAvatar.vue +++ b/src/components/ContactDetails/ContactDetailsAvatar.vue @@ -110,9 +110,10 @@ import { generateUrl, generateRemoteUrl } from '@nextcloud/router' import { getCurrentUser } from '@nextcloud/auth' import { loadState } from '@nextcloud/initial-state' import sanitizeSVG from '@mattkrick/sanitize-svg' - import axios from '@nextcloud/axios' +import logger from '../../services/logger.js' + const supportedNetworks = loadState('contacts', 'supportedNetworks') export default { @@ -453,7 +454,11 @@ export default { 'image/x-xbitmap', 'image/bmp', 'image/svg+xml', - ]) + ]).addButton({ + label: t('calendar', 'Pick'), + type: 'primary', + callback: (nodes) => logger.debug('Picked avatar', { nodes }), + }) .build() const file = await picker.pick()