Add option to move the poster name in with the avatar

This commit is contained in:
Robin Ward 2017-08-25 12:57:06 -04:00
parent ea969d1ed0
commit 324b02a830
1 changed files with 15 additions and 2 deletions

View File

@ -82,7 +82,8 @@ createWidget('post-avatar', {
tagName: 'div.topic-avatar',
settings: {
size: 'large'
size: 'large',
displayPosterName: false
},
html(attrs) {
@ -106,6 +107,10 @@ createWidget('post-avatar', {
result.push(h('div.poster-avatar-extra'));
if (this.settings.displayPosterName) {
result.push(this.attach('poster-name', attrs));
}
return result;
}
});
@ -141,8 +146,16 @@ function showReplyTab(attrs, siteSettings) {
createWidget('post-meta-data', {
tagName: 'div.topic-meta-data',
settings: {
displayPosterName: true
},
html(attrs) {
const result = [this.attach('poster-name', attrs)];
let result = [];
if (this.settings.displayPosterName) {
result.push(this.attach('poster-name', attrs));
}
if (attrs.isWhisper) {
result.push(h('div.post-info.whisper', {