mirror of
https://github.com/wekan/wekan.git
synced 2026-01-26 11:16:10 +01:00
The user is now able to upload an avatar, and pick one in a list. This functionality should eventually be abstracted in a community package but we still need to work on a great public API. We rely on collectionFS to manage uploaded avatars. We also removed bengott:avatar which was trying to solve the wrong problem (namely displaying the avatar, which is as simple as displaying an image), and not a avatar system as it should be. Gravatar support is coming (back) soon. We may also want to have a list of default fun avatars the user can choose instead of uploading its own one.
42 lines
1.3 KiB
Text
42 lines
1.3 KiB
Text
template(name="userAvatar")
|
|
.member.js-member(title="{{userData.profile.fullname}} ({{userData.username}})")
|
|
if userData.profile.avatarUrl
|
|
img.avatar.avatar-image(src=userData.profile.avatarUrl)
|
|
if showStatus
|
|
span.member-presence-status(class=presenceStatusClassName)
|
|
span.member-type(class=memberType)
|
|
|
|
template(name="userPopup")
|
|
.board-member-menu
|
|
.mini-profile-info
|
|
+userAvatar(user=user)
|
|
.info
|
|
h3.bottom
|
|
a.js-profile(href="{{pathFor route='Profile' username=user.username}}")= user.profile.name
|
|
p.quiet.bottom @{{ user.username }}
|
|
|
|
template(name="memberName")
|
|
a.js-show-mem-menu(href="{{pathFor route='Profile' username=user.username}}")
|
|
= user.profile.fullname
|
|
if username
|
|
| ({{ user.username }})
|
|
|
|
template(name="changeAvatarPopup")
|
|
ul.pop-over-list
|
|
each uploadedAvatars
|
|
li: a.js-select-avatar
|
|
.member: .avatar
|
|
img.avatar-image(src="{{url avatarUrlOptions}}")
|
|
| Uploaded avatar
|
|
if isSelected
|
|
i.fa.fa-check
|
|
p.sub-name
|
|
unless isSelected
|
|
a.js-delete-avatar
|
|
| Delete
|
|
| -
|
|
= original.name
|
|
input.hide.js-upload-avatar-input(accept="image/*;capture=camera" type="file")
|
|
button.full.js-upload-avatar
|
|
i.fa.fa-upload
|
|
| Upload an avatar
|