UX: updated 'new dot' styling
This commit is contained in:
parent
73c1d3e7fe
commit
fda8b3d879
|
@ -33,6 +33,11 @@ export default Ember.Component.extend(bufferedRender({
|
|||
attributeBindings: ['data-topic-id'],
|
||||
'data-topic-id': Em.computed.alias('topic.id'),
|
||||
|
||||
@computed
|
||||
newDotText() {
|
||||
return (this.currentUser && this.currentUser.trust_level > 0) ? "" : I18n.t('filters.new.lower_title');
|
||||
},
|
||||
|
||||
actions: {
|
||||
toggleBookmark() {
|
||||
this.get('topic').toggleBookmark().finally(() => this.rerenderBuffer());
|
||||
|
|
|
@ -13,9 +13,10 @@ export default Ember.Component.extend(bufferedRender({
|
|||
rerenderTriggers: ['url', 'unread', 'newPosts', 'unseen'],
|
||||
|
||||
buildBuffer(buffer) {
|
||||
const newDotText = (this.currentUser && this.currentUser.trust_level > 0) ? " " : I18n.t('filters.new.lower_title');
|
||||
const url = this.get('url');
|
||||
link(buffer, this.get('unread'), url, 'unread', 'unread_posts');
|
||||
link(buffer, this.get('newPosts'), url, 'new-posts', 'new_posts');
|
||||
link(buffer, this.get('unseen'), url, 'new-topic', 'new', I18n.t('filters.new.lower_title'));
|
||||
link(buffer, this.get('unseen'), url, 'new-topic', 'new', newDotText);
|
||||
}
|
||||
}));
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
import { default as computed } from "ember-addons/ember-computed-decorators";
|
||||
|
||||
export default Ember.Object.extend({
|
||||
postCountsPresent: Ember.computed.or('topic.unread', 'topic.displayNewPosts'),
|
||||
showBadges: Ember.computed.and('postBadgesEnabled', 'postCountsPresent')
|
||||
showBadges: Ember.computed.and('postBadgesEnabled', 'postCountsPresent'),
|
||||
|
||||
@computed
|
||||
newDotText() {
|
||||
return (this.currentUser && this.currentUser.trust_level > 0) ? "" : I18n.t('filters.new.lower_title');
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{#if view.showBadges}}
|
||||
{{raw "topic-post-badges" unread=topic.unread newPosts=topic.displayNewPosts unseen=topic.unseen url=topic.lastUnreadUrl}}
|
||||
{{raw "topic-post-badges" unread=topic.unread newPosts=topic.displayNewPosts unseen=topic.unseen url=topic.lastUnreadUrl newDotText=newDotText}}
|
||||
{{else}}
|
||||
{{raw "list/posts-count-column" topic=topic tagName="div"}}
|
||||
{{/if}}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
{{/if}}
|
||||
{{raw-plugin-outlet name="topic-list-after-title"}}
|
||||
{{#if showTopicPostBadges}}
|
||||
{{raw "topic-post-badges" unread=topic.unread newPosts=topic.displayNewPosts unseen=topic.unseen url=topic.lastUnreadUrl}}
|
||||
{{raw "topic-post-badges" unread=topic.unread newPosts=topic.displayNewPosts unseen=topic.unseen url=topic.lastUnreadUrl newDotText=newDotText}}
|
||||
{{/if}}
|
||||
</span>
|
||||
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
<a href='{{url}}' class='badge badge-notification new-posts' title='{{i18n "topic.total_unread_posts" count=newPosts}}'>{{newPosts}}</a>
|
||||
{{/if}}
|
||||
{{#if unseen ~}}
|
||||
<a href='{{url}}' class='badge badge-notification new-topic' title='{{i18n "topic.new"}}'>{{i18n 'filters.new.lower_title'}}</a>
|
||||
<a href='{{url}}' class='badge badge-notification new-topic' title='{{i18n "topic.new"}}'>{{newDotText}}</a>
|
||||
{{/if}}
|
||||
</span>
|
||||
|
|
Loading…
Reference in New Issue