diff options
author | Kerwin Bryant <kerwin612@qq.com> | 2024-11-28 10:15:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-28 02:15:59 +0000 |
commit | 68d9f365437967e30c49550539f0e24de815408c (patch) | |
tree | 776abf333061be6211aa3cefb4341063bd353e06 /templates | |
parent | f1bea3c3b878fba066bd25383f690a31fa9e5489 (diff) | |
download | gitea-68d9f365437967e30c49550539f0e24de815408c.tar.gz gitea-68d9f365437967e30c49550539f0e24de815408c.zip |
Allow cropping an avatar before setting it (#32565)
Provide a cropping tool on the avatar editing page, allowing users to
select the cropping area themselves. This way, users can decide the
displayed area of the image, rather than us deciding for them.
---------
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/user/settings/profile.tmpl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl index 9c7e2de218..f879587c71 100644 --- a/templates/user/settings/profile.tmpl +++ b/templates/user/settings/profile.tmpl @@ -127,6 +127,11 @@ <input id="new-avatar" name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp"> </div> + <div class="field tw-pl-4 cropper-panel tw-hidden"> + <div>{{ctx.Locale.Tr "settings.cropper_prompt"}}</div> + <div class="cropper-wrapper"><img class="cropper-source" src alt></div> + </div> + <div class="field"> <button class="ui primary button">{{ctx.Locale.Tr "settings.update_avatar"}}</button> <button class="ui red button link-action" data-url="{{.Link}}/avatar/delete">{{ctx.Locale.Tr "settings.delete_current_avatar"}}</button> |