client/users: make avatars clickable

This commit is contained in:
rr- 2016-06-11 11:00:52 +02:00
parent 7670737873
commit 8303c08437
2 changed files with 5 additions and 7 deletions

View file

@ -171,7 +171,6 @@ a .access-key
opacity: 0
width: 100%
height: 100%
span>.thumbnail
width: 20px
height: 20px
margin: 0 0.4em 0 0.4em

View file

@ -161,12 +161,11 @@ function makeTagLink(name) {
}
function makeUserLink(user) {
let link = api.hasPrivilege('users:view') ?
makeNonVoidElement('a', {'href': '/user/' + user.name}, user.name) :
user.name;
return makeNonVoidElement('span', {class: 'user'},
makeThumbnail(user.avatarUrl) +
link);
const text = makeThumbnail(user.avatarUrl) + user.name;
const link = api.hasPrivilege('users:view') ?
makeNonVoidElement('a', {'href': '/user/' + user.name}, text) :
text;
return makeNonVoidElement('span', {class: 'user'}, link);
}
function makeFlexboxAlign(options) {