mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-28 23:14:04 -04:00
FIX: Don't show timeline when less than 3 posts
This commit is contained in:
parent
9e39474ef9
commit
a8ed7e9ceb
1 changed files with 21 additions and 14 deletions
|
@ -205,19 +205,26 @@ export default createWidget('topic-timeline', {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
return [h('div.timeline-controls', controls),
|
|
||||||
this.attach('link', {
|
const result = [ h('div.timeline-controls', controls) ];
|
||||||
className: 'start-date',
|
const stream = attrs.topic.get('postStream.stream');
|
||||||
rawLabel: tinyDateYear(createdAt),
|
if (stream.length > 2) {
|
||||||
action: 'jumpTop'
|
return result.concat([
|
||||||
}),
|
this.attach('link', {
|
||||||
this.attach('timeline-scrollarea', attrs),
|
className: 'start-date',
|
||||||
this.attach('link', {
|
rawLabel: tinyDateYear(createdAt),
|
||||||
className: 'now-date',
|
action: 'jumpTop'
|
||||||
icon: 'dot-circle-o',
|
}),
|
||||||
label: 'topic.timeline.now',
|
this.attach('timeline-scrollarea', attrs),
|
||||||
action: 'jumpBottom'
|
this.attach('link', {
|
||||||
})
|
className: 'now-date',
|
||||||
];
|
icon: 'dot-circle-o',
|
||||||
|
label: 'topic.timeline.now',
|
||||||
|
action: 'jumpBottom'
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue