Merge pull request #4765 from ElTipejoLoco/show_tracked_topics_link

FEATURE: Add "Show tracked topics" to User Prefs
This commit is contained in:
Guo Xiang Tan 2017-04-06 12:34:10 +08:00 committed by GitHub
commit 9bc6a60503
3 changed files with 9 additions and 1 deletions

View File

@ -146,6 +146,11 @@ const User = RestModel.extend({
return defaultHomepage() === "latest" ? Discourse.getURL('/?state=watching') : Discourse.getURL('/latest?state=watching');
},
@computed()
trackingTopicsPath() {
return defaultHomepage() === "latest" ? Discourse.getURL('/?state=tracking') : Discourse.getURL('/latest?state=tracking');
},
@computed("username")
username_lower(username) {
return username.toLowerCase();

View File

@ -263,12 +263,14 @@
<div class="controls category-controls">
<a href="{{unbound model.watchingTopicsPath}}">{{i18n 'user.watched_topics_link'}}</a>
</div>
<div class="instructions"></div>
<div class="controls category-controls">
<label><span class="icon fa fa-circle tracking"></span> {{i18n 'user.tracked_categories'}}</label>
{{category-selector categories=model.trackedCategories blacklist=selectedCategories}}
</div>
<div class="instructions">{{i18n 'user.tracked_categories_instructions'}}</div>
<div class="controls category-controls">
<a href="{{unbound model.trackingTopicsPath}}">{{i18n 'user.tracked_topics_link'}}</a>
</div>
<div class="controls category-controls">
<label><span class="icon fa fa-dot-circle-o watching-first-post"></span> {{i18n 'user.watched_first_post_categories'}}</label>
{{category-selector categories=model.watchedFirstPostCategories}}

View File

@ -627,6 +627,7 @@ en:
muted_users_instructions: "Suppress all notifications from these users."
muted_topics_link: "Show muted topics"
watched_topics_link: "Show watched topics"
tracked_topics_link: "Show tracked topics"
automatically_unpin_topics: "Automatically unpin topics when I reach the bottom."
apps: "Apps"
revoke_access: "Revoke Access"