UX: Use relative age instead of "Now"

This commit is contained in:
Robin Ward 2016-05-19 13:11:36 -04:00
parent 1c49c57494
commit 5901faa643
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D
3 changed files with 4 additions and 4 deletions

View File

@ -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'
})
]);

View File

@ -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;

View File

@ -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: