Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable6.1] fix:filepicker for contact avatar #4332

Open
wants to merge 1 commit into
base: stable6.1
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/components/ContactDetails/ContactDetailsAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@
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'

Check warning on line 115 in src/components/ContactDetails/ContactDetailsAvatar.vue

View check run for this annotation

Codecov / codecov/patch

src/components/ContactDetails/ContactDetailsAvatar.vue#L115

Added line #L115 was not covered by tests

const supportedNetworks = loadState('contacts', 'supportedNetworks')

export default {
Expand Down Expand Up @@ -453,7 +454,11 @@
'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
Loading