Skip to content

Commit

Permalink
fix:filepicker for contact avatar
Browse files Browse the repository at this point in the history
Signed-off-by: Hamza Mahjoubi <[email protected]>
  • Loading branch information
hamza221 authored and backportbot[bot] committed Feb 6, 2025
1 parent eece352 commit a21cc2d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/ContactDetails/ContactDetailsAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,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 {
Expand Down Expand Up @@ -473,7 +474,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()
Expand Down

0 comments on commit a21cc2d

Please sign in to comment.