mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
UX: Use relative age instead of "Now"
This commit is contained in:
parent
1c49c57494
commit
5901faa643
3 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
import { createWidget } from 'discourse/widgets/widget';
|
||||
import { h } from 'virtual-dom';
|
||||
import { smartShortDate } from 'discourse/lib/formatter';
|
||||
import { smartShortDate, relativeAge } from 'discourse/lib/formatter';
|
||||
import { iconNode } from 'discourse/helpers/fa-icon';
|
||||
|
||||
const SCROLLAREA_HEIGHT = 300;
|
||||
|
@ -205,7 +205,6 @@ export default createWidget('topic-timeline', {
|
|||
}));
|
||||
}
|
||||
|
||||
|
||||
const result = [ h('div.timeline-controls', controls) ];
|
||||
const stream = attrs.topic.get('postStream.stream');
|
||||
if (stream.length > 2) {
|
||||
|
@ -219,7 +218,7 @@ export default createWidget('topic-timeline', {
|
|||
this.attach('link', {
|
||||
className: 'now-date',
|
||||
icon: 'dot-circle-o',
|
||||
label: 'topic.timeline.now',
|
||||
rawLabel: relativeAge(new Date(topic.last_posted_at)),
|
||||
action: 'jumpBottom'
|
||||
})
|
||||
]);
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
}
|
||||
|
||||
.start-date {
|
||||
@include unselectable;
|
||||
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
|
||||
}
|
||||
|
||||
|
@ -77,6 +78,7 @@
|
|||
}
|
||||
|
||||
.now-date {
|
||||
@include unselectable;
|
||||
display: inline-block;
|
||||
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
|
||||
margin-top: 0.5em;
|
||||
|
|
|
@ -1290,7 +1290,6 @@ en:
|
|||
auto_close_immediate: "The last post in the topic is already %{hours} hours old, so the topic will be closed immediately."
|
||||
|
||||
timeline:
|
||||
now: "Now"
|
||||
replies: "%{current} / %{total} replies"
|
||||
|
||||
progress:
|
||||
|
|
Loading…
Reference in a new issue