feat(web): set asset as profile picture (#3106)

* add profile-image-cropper component

* add dom-to-image library

* add store to update user profile picture when set

* dom-to-image

* remove console.logs, add svelte binding

* fix format, unused vars

* change caching of profile image

* set hash after profile image change

* remove unnecessary store

* remove unecesarry changes

* set types/dom-to-image as devDependency

* remove unecessary type declarations
use handleError

* remove error notification
which is already handled by handleError

* Revert "set types/dom-to-image as devDependency"

This reverts commit ca8b3ed1bbe728de8bc5890e32ae76324a95a6ca.

* add types do dev dependencies

* use on:close instead of on:close={()=>...}

* add newline

* sort imports

* bind photo-viewer imgElement directly, not working

* remove console.log, fix binding

* make imgElement optional

* fix element as optional prop

* fix type

* check for transparency

* small changes

* fix img.decode

* add bg, remove publicsharedkey

* fix omit publicSharedKey

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
faupau
2023-07-16 03:31:33 +02:00
committed by GitHub
parent ed3c239b7e
commit 7595d01956
7 changed files with 204 additions and 121 deletions

View File

@@ -28,6 +28,7 @@
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/svelte": "^4.0.3",
"@types/cookie": "^0.5.1",
"@types/dom-to-image": "^2.6.4",
"@types/justified-layout": "^4.1.0",
"@types/leaflet": "^1.9.1",
"@types/leaflet.markercluster": "^1.5.1",
@@ -62,6 +63,7 @@
"axios": "^0.27.2",
"buffer": "^6.0.3",
"copy-image-clipboard": "^2.1.2",
"dom-to-image": "^2.6.0",
"handlebars": "^4.7.7",
"justified-layout": "^4.1.0",
"leaflet": "^1.9.4",