From e234a7821d9b7c429f4dde49268c1cad1da7e94e Mon Sep 17 00:00:00 2001 From: ElTipejoLoco Date: Fri, 17 Mar 2017 08:05:21 -0500 Subject: [PATCH] Add "Show tracked topics" to User Preferences Does what it says on the tin. Minor clean-up. --- app/assets/javascripts/discourse/models/user.js.es6 | 5 +++++ app/assets/javascripts/discourse/templates/preferences.hbs | 4 +++- config/locales/client.en.yml | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/models/user.js.es6 b/app/assets/javascripts/discourse/models/user.js.es6 index 5086c54cbc5..7fecf9eb30d 100644 --- a/app/assets/javascripts/discourse/models/user.js.es6 +++ b/app/assets/javascripts/discourse/models/user.js.es6 @@ -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(); diff --git a/app/assets/javascripts/discourse/templates/preferences.hbs b/app/assets/javascripts/discourse/templates/preferences.hbs index 4be554bdf67..6fea4f7f6f7 100644 --- a/app/assets/javascripts/discourse/templates/preferences.hbs +++ b/app/assets/javascripts/discourse/templates/preferences.hbs @@ -263,12 +263,14 @@
{{i18n 'user.watched_topics_link'}}
-
{{category-selector categories=model.trackedCategories blacklist=selectedCategories}}
{{i18n 'user.tracked_categories_instructions'}}
+
+ {{i18n 'user.tracked_topics_link'}} +
{{category-selector categories=model.watchedFirstPostCategories}} diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index cd3f3d15b13..6c500a5984a 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -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"