mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
This commit is contained in:
@@ -220,7 +220,7 @@ if (document.readyState === 'loading') {
|
||||
if (!isTouchDevice) {
|
||||
els = els || $('body');
|
||||
els.tooltip({
|
||||
selector: '.avatar.avatar-tooltip',
|
||||
selector: '.avatar-tooltip',
|
||||
placement: placement || 'top',
|
||||
container: '#content',
|
||||
animation: false,
|
||||
|
||||
@@ -214,9 +214,9 @@ module.exports = function (utils, Benchpress, relative_path) {
|
||||
|
||||
function renderTopicImage(topicObj) {
|
||||
if (topicObj.thumb) {
|
||||
return '<img src="' + topicObj.thumb + '" class="img-circle user-img" title="' + topicObj.user.username + '" />';
|
||||
return '<img src="' + topicObj.thumb + '" class="img-circle user-img" title="' + topicObj.user.displayname + '" />';
|
||||
}
|
||||
return '<img component="user/picture" data-uid="' + topicObj.user.uid + '" src="' + topicObj.user.picture + '" class="user-img" title="' + topicObj.user.username + '" />';
|
||||
return '<img component="user/picture" data-uid="' + topicObj.user.uid + '" src="' + topicObj.user.picture + '" class="user-img" title="' + topicObj.user.displayname + '" />';
|
||||
}
|
||||
|
||||
function renderDigestAvatar(block) {
|
||||
@@ -313,7 +313,7 @@ module.exports = function (utils, Benchpress, relative_path) {
|
||||
let output = '';
|
||||
|
||||
if (userObj.picture) {
|
||||
output += `<img${attr2String(attributes)} alt="${userObj.username}" loading="lazy" component="${component || 'avatar/picture'}" src="${userObj.picture}" style="${styles.join(' ')}" onError="this.remove()" itemprop="image" />`;
|
||||
output += `<img${attr2String(attributes)} alt="${userObj.displayname}" loading="lazy" component="${component || 'avatar/picture'}" src="${userObj.picture}" style="${styles.join(' ')}" onError="this.remove()" itemprop="image" />`;
|
||||
}
|
||||
output += `<span${attr2String(attributes)} component="${component || 'avatar/icon'}" style="${styles.join(' ')} background-color: ${userObj['icon:bgColor']}">${userObj['icon:text']}</span>`;
|
||||
return output;
|
||||
|
||||
Reference in New Issue
Block a user