tailchat
tailchat copied to clipboard
refactor:简化头像计算,新增头像最大尺寸参数,避免头像裁剪出来太大 || refactor: Simplify the avatar calculation and add a new avatar. Maximum size parameter to prevent the avatar from being cropped too large
使用的时候遇到提示文件太大,但是手机上的照片动辄10m+,优化了一下裁剪头像,现在选择本地图片可以选择更大的图片了
When using it, I encountered a prompt that the file is too large, but the photos on the mobile phone are often 10m+. I have optimized the cropped avatar. Now you can choose a larger image when selecting a local image.
Deploy Preview for tailchat-nightly ready!
| Name | Link |
|---|---|
| Latest commit | c8e5102092491ed996af87bf372b419ca3b6f765 |
| Latest deploy log | https://app.netlify.com/sites/tailchat-nightly/deploys/65a09f4d2b053800087827a6 |
| Deploy Preview | https://deploy-preview-199--tailchat-nightly.netlify.app/ |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
I dont know why you continue wanna change algorithm
This pr has two problem:
- the safe area algorithm is to make sure the behavior of crop and rotate logic is work fine and not lost information. i dont know why you wanna delete it, because it looks like you just wanna set a max width to make sure image size is safe.
- and you should pass your props(maxSize in your code) from avatar picker into this crop function. if you just only add a param, its will not be work.
if you can not cover it, free feel to tell me, i can merge it and change this logic work fine