A platform for community discussion. Free, open, simple.
UX: updated 'new dot' styling
Arpit Jalanfda8b3d8793d
diff --git a/app/assets/javascripts/discourse/components/topic-list-item.js.es6 b/app/assets/javascripts/discourse/components/topic-list-item.js.es6index f9b3cd38b76..bf8e273d444 100644--- a/app/assets/javascripts/discourse/components/topic-list-item.js.es6+++ b/app/assets/javascripts/discourse/components/topic-list-item.js.es6@@ -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());diff --git a/app/assets/javascripts/discourse/components/topic-post-badges.js.es6 b/app/assets/javascripts/discourse/components/topic-post-badges.js.es6index 9eb07ade4fb..f125c839b22 100644--- a/app/assets/javascripts/discourse/components/topic-post-badges.js.es6+++ b/app/assets/javascripts/discourse/components/topic-post-badges.js.es6@@ -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);}}));diff --git a/app/assets/javascripts/discourse/raw-views/list/post-count-or-badges.js.es6 b/app/assets/javascripts/discourse/raw-views/list/post-count-or-badges.js.es6index 40faddcde29..6d35e0800fc 100644--- a/app/assets/javascripts/discourse/raw-views/list/post-count-or-badges.js.es6+++ b/app/assets/javascripts/discourse/raw-views/list/post-count-or-badges.js.es6@@ -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');+ }});diff --git a/app/assets/javascripts/discourse/templates/list/post-count-or-badges.raw.hbs b/app/assets/javascripts/discourse/templates/list/post-count-or-badges.raw.hbsindex 4e41ba326b1..f997dcbff02 100644--- a/app/assets/javascripts/discourse/templates/list/post-count-or-badges.raw.hbs+++ b/app/assets/javascripts/discourse/templates/list/post-count-or-badges.raw.hbs@@ -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}}diff --git a/app/assets/javascripts/discourse/templates/list/topic-list-item.raw.hbs b/app/assets/javascripts/discourse/templates/list/topic-list-item.raw.hbsindex 942e3f8d820..2831237bc55 100644--- a/app/assets/javascripts/discourse/templates/list/topic-list-item.raw.hbs+++ b/app/assets/javascripts/discourse/templates/list/topic-list-item.raw.hbs@@ -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>diff --git a/app/assets/javascripts/discourse/templates/topic-post-badges.raw.hbs b/app/assets/javascripts/discourse/templates/topic-post-badges.raw.hbsindex b2076113c31..2cbf0f9b696 100644--- a/app/assets/javascripts/discourse/templates/topic-post-badges.raw.hbs+++ b/app/assets/javascripts/discourse/templates/topic-post-badges.raw.hbs@@ -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>