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 opacity: 0
width: 100% width: 100%
height: 100% height: 100%
span>.thumbnail
width: 20px width: 20px
height: 20px height: 20px
margin: 0 0.4em 0 0.4em margin: 0 0.4em 0 0.4em

View file

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