Merge branch 'renovate/cropperjs-2.x' into 'develop'

Update dependency cropperjs to v2

See merge request pleroma/pleroma-fe!2087
This commit is contained in:
HJ 2025-04-02 10:18:00 +00:00
commit 33226d3f66
6 changed files with 193 additions and 50 deletions

View file

@ -216,7 +216,7 @@ const ProfileTab = {
this.submitBackground('')
}
},
submitAvatar (cropper, file) {
submitAvatar (canvas, file) {
const that = this
return new Promise((resolve, reject) => {
function updateAvatar (avatar, avatarName) {
@ -232,8 +232,8 @@ const ProfileTab = {
})
}
if (cropper) {
cropper.getCroppedCanvas().toBlob((data) => updateAvatar(data, file.name), file.type)
if (canvas) {
canvas.toBlob((data) => updateAvatar(data, file.name), file.type)
} else {
updateAvatar(file, file.name)
}