Implement profile picture/banner crop system & gif support#40
Conversation
|
didn't know you guys don't use pnpm oops might wanna remove the lockfile |
|
one issue is the admin panel not using this, will look into it when i have the time |
richardscull
left a comment
There was a problem hiding this comment.
Thanks for the contribution! The code is actually very excellent quality, but I just have small nitpicks about it. Most important comments would be with how we crop the image in ImageCropDialog.
Regarding some of your comments:
It also supports gifs since i wanted that in my fork.
I'm not sure what do you mean by this? I see that current implementation just default to standard gif upload and don't crops it. The gifs themselves were already supported for uploading 🤷♂️
one issue is the admin panel not using this, will look into it when i have the time
Seems just a question of adding new props to the ImageSelect. The only issue that the current locals address image crop as "your" avatar/banner, which is not true for admin panel.
|
@asteriau Is fine with the requested changes, but don't have time to implement it herself. |
As the title says, this PR implements a system to crop profile pictures/banners before uploading them, much like discord.
This adds a new dependency (react-easy-crop) but i think it's worth the headache of implementing it myself.
Previews:


It's functional, but i'm open to UI/UX improvement suggestions :)
The code itself is a little messy as i did this at like 6 am (oops)
It also supports gifs since i wanted that in my fork. Feel free to remove that if you wish to make it a supporter feature or similar in the future.