From a6c787345ce37f0b82e9c9e7443300ef6807ec9f Mon Sep 17 00:00:00 2001 From: Kris Date: Thu, 17 Nov 2022 20:09:04 -0500 Subject: [PATCH] UX: reorganize user prefs for experimental user nav (#18764) Trying out changes to reduce the number of nav items in the experimental horizontal user nav. These changes should only appear with the redesigned_user_page_nav_enabled feature flag. 1. Created a new "Tracking" route. This combines some tracking-related settings from Notifications and Category and Tag tracking (which were separate tabs previously). Don't love the layout yet, but it's something that we can work on. 2. Moved some user-related settings out of Notifications and to the Users tab. These seem more user-related to me, and it's nice that we can associate enabling messages with the setting to limit who can send messages. 3. Moved the App tab (lists app permissions) to be within the Security tab. It's very similar to Recently Used Devices. --- .../components/user-nav/preferences-nav.hbs | 31 ++-- .../allow-private-messages.hbs | 6 + .../user-preferences/categories.hbs | 53 ++++++ .../app/components/user-preferences/tags.hbs | 45 +++++ .../user-preferences/topic-tracking.hbs | 16 ++ .../user-preferences/user-api-keys.hbs | 26 +++ .../app/controllers/preferences/tracking.js | 157 ++++++++++++++++++ .../app/controllers/preferences/users.js | 6 +- .../discourse/app/routes/app-route-map.js | 1 + .../app/routes/preferences-tracking.js | 5 + .../discourse/app/templates/preferences.hbs | 4 +- .../app/templates/preferences/apps.hbs | 27 +-- .../app/templates/preferences/categories.hbs | 57 +------ .../templates/preferences/notifications.hbs | 31 ++-- .../app/templates/preferences/security.hbs | 4 + .../app/templates/preferences/tags.hbs | 55 +----- .../app/templates/preferences/tracking.hbs | 29 ++++ .../app/templates/preferences/users.hbs | 6 +- .../tests/acceptance/preferences-test.js | 10 +- .../user-preferences-new-menu-test.js | 60 +++++++ .../stylesheets/common/base/new-user.scss | 23 +++ config/locales/client.en.yml | 2 + config/routes.rb | 1 + 23 files changed, 482 insertions(+), 173 deletions(-) create mode 100644 app/assets/javascripts/discourse/app/components/user-preferences/allow-private-messages.hbs create mode 100644 app/assets/javascripts/discourse/app/components/user-preferences/categories.hbs create mode 100644 app/assets/javascripts/discourse/app/components/user-preferences/tags.hbs create mode 100644 app/assets/javascripts/discourse/app/components/user-preferences/topic-tracking.hbs create mode 100644 app/assets/javascripts/discourse/app/components/user-preferences/user-api-keys.hbs create mode 100644 app/assets/javascripts/discourse/app/controllers/preferences/tracking.js create mode 100644 app/assets/javascripts/discourse/app/routes/preferences-tracking.js create mode 100644 app/assets/javascripts/discourse/app/templates/preferences/tracking.hbs create mode 100644 app/assets/javascripts/discourse/tests/acceptance/user-preferences-new-menu-test.js diff --git a/app/assets/javascripts/discourse/app/components/user-nav/preferences-nav.hbs b/app/assets/javascripts/discourse/app/components/user-nav/preferences-nav.hbs index 29e1c35c5d1..45a007b6c3f 100644 --- a/app/assets/javascripts/discourse/app/components/user-nav/preferences-nav.hbs +++ b/app/assets/javascripts/discourse/app/components/user-nav/preferences-nav.hbs @@ -4,58 +4,58 @@ {{i18n "user.preferences_nav.account"}} + + + + + {{#if @model.can_change_tracking_preferences}} - {{/if}} + -{{#if (and @model.can_change_tracking_preferences @siteSettings.tagging_enabled)}} - -{{/if}} + + {{#if @siteSettings.enable_experimental_sidebar_hamburger}} {{/if}} + - diff --git a/app/assets/javascripts/discourse/app/components/user-preferences/allow-private-messages.hbs b/app/assets/javascripts/discourse/app/components/user-preferences/allow-private-messages.hbs new file mode 100644 index 00000000000..82afce8d817 --- /dev/null +++ b/app/assets/javascripts/discourse/app/components/user-preferences/allow-private-messages.hbs @@ -0,0 +1,6 @@ +
+ +
+ +
+
diff --git a/app/assets/javascripts/discourse/app/components/user-preferences/categories.hbs b/app/assets/javascripts/discourse/app/components/user-preferences/categories.hbs new file mode 100644 index 00000000000..db5cb241df9 --- /dev/null +++ b/app/assets/javascripts/discourse/app/components/user-preferences/categories.hbs @@ -0,0 +1,53 @@ +
+ + +
+ + {{#if @canSee}} + {{i18n "user.tracked_topics_link"}} + {{/if}} + +
+
{{i18n "user.watched_categories_instructions"}}
+ +
+ + {{#if @canSee}} + {{i18n "user.tracked_topics_link"}} + {{/if}} + +
+
{{i18n "user.tracked_categories_instructions"}}
+ +
+ + +
+
{{i18n "user.watched_first_post_categories_instructions"}}
+ + {{#if @siteSettings.mute_all_categories_by_default}} +
+ + +
+
{{i18n "user.regular_categories_instructions"}}
+ {{else}} +
+ + + {{#if @canSee}} + {{i18n "user.tracked_topics_link"}} + {{/if}} + + +
+ +
{{i18n (if @hideMutedTags "user.muted_categories_instructions" "user.muted_categories_instructions_dont_hide")}}
+ {{/if}} +
+ + + +
+ + diff --git a/app/assets/javascripts/discourse/app/components/user-preferences/tags.hbs b/app/assets/javascripts/discourse/app/components/user-preferences/tags.hbs new file mode 100644 index 00000000000..a63a17ca4ae --- /dev/null +++ b/app/assets/javascripts/discourse/app/components/user-preferences/tags.hbs @@ -0,0 +1,45 @@ +{{#if @siteSettings.tagging_enabled}} +
+ + +
+ + +
+ +
{{i18n "user.watched_tags_instructions"}}
+ +
+ + +
+ +
{{i18n "user.tracked_tags_instructions"}}
+ +
+ + +
+ +
+ {{i18n "user.watched_first_post_tags_instructions"}} +
+ +
+ + +
+
{{i18n "user.muted_tags_instructions"}}
+
+ + + +{{/if}} diff --git a/app/assets/javascripts/discourse/app/components/user-preferences/topic-tracking.hbs b/app/assets/javascripts/discourse/app/components/user-preferences/topic-tracking.hbs new file mode 100644 index 00000000000..75e772cb73c --- /dev/null +++ b/app/assets/javascripts/discourse/app/components/user-preferences/topic-tracking.hbs @@ -0,0 +1,16 @@ +
+
+ + +
+ +
+ + +
+ +
+ + +
+
diff --git a/app/assets/javascripts/discourse/app/components/user-preferences/user-api-keys.hbs b/app/assets/javascripts/discourse/app/components/user-preferences/user-api-keys.hbs new file mode 100644 index 00000000000..96833b93a32 --- /dev/null +++ b/app/assets/javascripts/discourse/app/components/user-preferences/user-api-keys.hbs @@ -0,0 +1,26 @@ +{{#if @model.userApiKeys}} +
+ +
+ {{#each @model.userApiKeys as |key|}} +
+ {{key.application_name}} + {{#if key.revoked}} + + {{else}} + + {{/if}} +

+

    + {{#each key.scopes as |scope|}} +
  • {{scope}}
  • + {{/each}} +
+

+

{{i18n "user.api_approved"}} {{bound-date key.created_at}}

+

{{i18n "user.api_last_used_at"}} {{bound-date key.last_used_at}}

+
+ {{/each}} +
+
+{{/if}} diff --git a/app/assets/javascripts/discourse/app/controllers/preferences/tracking.js b/app/assets/javascripts/discourse/app/controllers/preferences/tracking.js new file mode 100644 index 00000000000..a2c76e7e3ba --- /dev/null +++ b/app/assets/javascripts/discourse/app/controllers/preferences/tracking.js @@ -0,0 +1,157 @@ +import Controller from "@ember/controller"; +import { NotificationLevels } from "discourse/lib/notification-levels"; +import I18n from "I18n"; +import { popupAjaxError } from "discourse/lib/ajax-error"; +import { action, computed } from "@ember/object"; +import { inject as service } from "@ember/service"; +import { tracked } from "@glimmer/tracking"; + +export default class extends Controller { + @service currentUser; + @service siteSettings; + @tracked saved = false; + + saveAttrNames = [ + "new_topic_duration_minutes", + "auto_track_topics_after_msecs", + "notification_level_when_replying", + "muted_category_ids", + "regular_category_ids", + "watched_category_ids", + "tracked_category_ids", + "watched_first_post_category_ids", + "muted_tags", + "tracked_tags", + "watched_tags", + "watching_first_post_tags", + ]; + + likeNotificationFrequencies = [ + { name: I18n.t("user.like_notification_frequency.always"), value: 0 }, + { + name: I18n.t("user.like_notification_frequency.first_time_and_daily"), + value: 1, + }, + { name: I18n.t("user.like_notification_frequency.first_time"), value: 2 }, + { name: I18n.t("user.like_notification_frequency.never"), value: 3 }, + ]; + + autoTrackDurations = [ + { name: I18n.t("user.auto_track_options.never"), value: -1 }, + { name: I18n.t("user.auto_track_options.immediately"), value: 0 }, + { + name: I18n.t("user.auto_track_options.after_30_seconds"), + value: 30000, + }, + { name: I18n.t("user.auto_track_options.after_1_minute"), value: 60000 }, + { + name: I18n.t("user.auto_track_options.after_2_minutes"), + value: 120000, + }, + { + name: I18n.t("user.auto_track_options.after_3_minutes"), + value: 180000, + }, + { + name: I18n.t("user.auto_track_options.after_4_minutes"), + value: 240000, + }, + { + name: I18n.t("user.auto_track_options.after_5_minutes"), + value: 300000, + }, + { + name: I18n.t("user.auto_track_options.after_10_minutes"), + value: 600000, + }, + ]; + + notificationLevelsForReplying = [ + { + name: I18n.t("topic.notifications.watching.title"), + value: NotificationLevels.WATCHING, + }, + { + name: I18n.t("topic.notifications.tracking.title"), + value: NotificationLevels.TRACKING, + }, + { + name: I18n.t("topic.notifications.regular.title"), + value: NotificationLevels.REGULAR, + }, + ]; + + considerNewTopicOptions = [ + { name: I18n.t("user.new_topic_duration.not_viewed"), value: -1 }, + { name: I18n.t("user.new_topic_duration.after_1_day"), value: 60 * 24 }, + { name: I18n.t("user.new_topic_duration.after_2_days"), value: 60 * 48 }, + { + name: I18n.t("user.new_topic_duration.after_1_week"), + value: 7 * 60 * 24, + }, + { + name: I18n.t("user.new_topic_duration.after_2_weeks"), + value: 2 * 7 * 60 * 24, + }, + { name: I18n.t("user.new_topic_duration.last_here"), value: -2 }, + ]; + + get canSee() { + return this.currentUser.id === this.model.id; + } + + @computed( + "model.watched_tags.[]", + "model.watching_first_post_tags.[]", + "model.tracked_tags.[]", + "model.muted_tags.[]" + ) + get selectedTags() { + return [] + .concat( + this.model.watched_tags, + this.model.watching_first_post_tags, + this.model.tracked_tags, + this.model.muted_tags + ) + .filter((t) => t); + } + + @computed( + "model.watchedCategories", + "model.watchedFirstPostCategories", + "model.trackedCategories", + "model.mutedCategories" + ) + get selectedCategories() { + return [] + .concat( + this.modelwatchedCategories, + this.model.watchedFirstPostCategories, + this.model.tracakedCategories, + this.model.mutedCategories + ) + .filter((t) => t); + } + + @computed("siteSettings.remove_muted_tags_from_latest") + get hideMutedTags() { + return this.siteSettings.remove_muted_tags_from_latest !== "never"; + } + + get canSave() { + return this.canSee || this.currentUser.admin; + } + + @action + save() { + this.saved = false; + + return this.model + .save(this.saveAttrNames) + .then(() => { + this.saved = true; + }) + .catch(popupAjaxError); + } +} diff --git a/app/assets/javascripts/discourse/app/controllers/preferences/users.js b/app/assets/javascripts/discourse/app/controllers/preferences/users.js index f47f7efec3b..81eb728d3f3 100644 --- a/app/assets/javascripts/discourse/app/controllers/preferences/users.js +++ b/app/assets/javascripts/discourse/app/controllers/preferences/users.js @@ -51,6 +51,7 @@ export default Controller.extend({ this._super(...arguments); this.saveAttrNames = [ + "allow_private_messages", "muted_usernames", "allowed_pm_usernames", "enable_allowed_pm_users", @@ -72,11 +73,6 @@ export default Controller.extend({ return !allowPrivateMessages; }, - @discourseComputed("currentUser.can_send_private_messages") - showMessageSettings() { - return this.currentUser?.can_send_private_messages; - }, - @action save() { this.set("saved", false); diff --git a/app/assets/javascripts/discourse/app/routes/app-route-map.js b/app/assets/javascripts/discourse/app/routes/app-route-map.js index fd06c0b178b..452125109be 100644 --- a/app/assets/javascripts/discourse/app/routes/app-route-map.js +++ b/app/assets/javascripts/discourse/app/routes/app-route-map.js @@ -161,6 +161,7 @@ export default function () { this.route("profile"); this.route("emails"); this.route("notifications"); + this.route("tracking"); this.route("categories"); this.route("users"); this.route("tags"); diff --git a/app/assets/javascripts/discourse/app/routes/preferences-tracking.js b/app/assets/javascripts/discourse/app/routes/preferences-tracking.js new file mode 100644 index 00000000000..bfec0d17c4c --- /dev/null +++ b/app/assets/javascripts/discourse/app/routes/preferences-tracking.js @@ -0,0 +1,5 @@ +import RestrictedUserRoute from "discourse/routes/restricted-user"; + +export default RestrictedUserRoute.extend({ + showFooter: true, +}); diff --git a/app/assets/javascripts/discourse/app/templates/preferences.hbs b/app/assets/javascripts/discourse/app/templates/preferences.hbs index b2aa84d5020..21758e3d4ff 100644 --- a/app/assets/javascripts/discourse/app/templates/preferences.hbs +++ b/app/assets/javascripts/discourse/app/templates/preferences.hbs @@ -3,8 +3,7 @@
@@ -79,6 +78,7 @@ {{/if}} + diff --git a/app/assets/javascripts/discourse/app/templates/preferences/apps.hbs b/app/assets/javascripts/discourse/app/templates/preferences/apps.hbs index 56795452dc7..cd41f237626 100644 --- a/app/assets/javascripts/discourse/app/templates/preferences/apps.hbs +++ b/app/assets/javascripts/discourse/app/templates/preferences/apps.hbs @@ -1,28 +1,3 @@ -{{#if this.model.userApiKeys}} -
- -
- {{#each this.model.userApiKeys as |key|}} -
- {{key.application_name}} - {{#if key.revoked}} - - {{else}} - - {{/if}} -

-

    - {{#each key.scopes as |scope|}} -
  • {{scope}}
  • - {{/each}} -
-

-

{{i18n "user.api_approved"}} {{bound-date key.created_at}}

-

{{i18n "user.api_last_used_at"}} {{bound-date key.last_used_at}}

-
- {{/each}} -
-
-{{/if}} + diff --git a/app/assets/javascripts/discourse/app/templates/preferences/categories.hbs b/app/assets/javascripts/discourse/app/templates/preferences/categories.hbs index 8a0b2b716b3..813e34faf37 100644 --- a/app/assets/javascripts/discourse/app/templates/preferences/categories.hbs +++ b/app/assets/javascripts/discourse/app/templates/preferences/categories.hbs @@ -1,53 +1,10 @@ -
- - -
- - {{#if this.canSee}} - {{i18n "user.tracked_topics_link"}} - {{/if}} - -
-
{{i18n "user.watched_categories_instructions"}}
- -
- - {{#if this.canSee}} - {{i18n "user.tracked_topics_link"}} - {{/if}} - -
-
{{i18n "user.tracked_categories_instructions"}}
- -
- - -
-
{{i18n "user.watched_first_post_categories_instructions"}}
- - {{#if this.siteSettings.mute_all_categories_by_default}} -
- - -
-
{{i18n "user.regular_categories_instructions"}}
- {{else}} -
- - {{#if this.canSee}} - {{i18n "user.tracked_topics_link"}} - {{/if}} - -
-
{{i18n (if this.hideMutedTags "user.muted_categories_instructions" "user.muted_categories_instructions_dont_hide")}}
- {{/if}} -
- - - -
- - + {{#if this.canSave}} diff --git a/app/assets/javascripts/discourse/app/templates/preferences/notifications.hbs b/app/assets/javascripts/discourse/app/templates/preferences/notifications.hbs index 6f142e25a1c..62135b8560a 100644 --- a/app/assets/javascripts/discourse/app/templates/preferences/notifications.hbs +++ b/app/assets/javascripts/discourse/app/templates/preferences/notifications.hbs @@ -1,20 +1,13 @@
-
- - -
- -
- - -
- -
- - -
+ {{#unless this.currentUser.redesigned_user_page_nav_enabled}} + + {{/unless}}
@@ -34,13 +27,9 @@ {{#if this.showMessageSettings}} -
- - -
- -
-
+ {{#unless this.currentUser.redesigned_user_page_nav_enabled}} + + {{/unless}} {{/if}} diff --git a/app/assets/javascripts/discourse/app/templates/preferences/security.hbs b/app/assets/javascripts/discourse/app/templates/preferences/security.hbs index 78459f73e73..54a517cf807 100644 --- a/app/assets/javascripts/discourse/app/templates/preferences/security.hbs +++ b/app/assets/javascripts/discourse/app/templates/preferences/security.hbs @@ -71,6 +71,10 @@
{{/if}} +{{#if this.currentUser.redesigned_user_page_nav_enabled}} + +{{/if}} +
diff --git a/app/assets/javascripts/discourse/app/templates/preferences/tags.hbs b/app/assets/javascripts/discourse/app/templates/preferences/tags.hbs index 6ef089fc766..71b18e61ddd 100644 --- a/app/assets/javascripts/discourse/app/templates/preferences/tags.hbs +++ b/app/assets/javascripts/discourse/app/templates/preferences/tags.hbs @@ -1,50 +1,7 @@ -{{#if this.siteSettings.tagging_enabled}} -
- + -
- - -
- -
{{i18n "user.watched_tags_instructions"}}
- -
- - -
- -
{{i18n "user.tracked_tags_instructions"}}
- -
- - -
- -
- {{i18n "user.watched_first_post_tags_instructions"}} -
- -
- - -
-
{{i18n "user.muted_tags_instructions"}}
-
- - - -
- - - - -{{/if}} + diff --git a/app/assets/javascripts/discourse/app/templates/preferences/tracking.hbs b/app/assets/javascripts/discourse/app/templates/preferences/tracking.hbs new file mode 100644 index 00000000000..c12f05eeb91 --- /dev/null +++ b/app/assets/javascripts/discourse/app/templates/preferences/tracking.hbs @@ -0,0 +1,29 @@ + + +
+ + +
+ +
+ + + +
+ +{{#if this.canSave}} + +{{/if}} diff --git a/app/assets/javascripts/discourse/app/templates/preferences/users.hbs b/app/assets/javascripts/discourse/app/templates/preferences/users.hbs index 5589f14d47e..69c15a274ec 100644 --- a/app/assets/javascripts/discourse/app/templates/preferences/users.hbs +++ b/app/assets/javascripts/discourse/app/templates/preferences/users.hbs @@ -21,7 +21,11 @@
{{i18n "user.muted_users_instructions"}}
-{{#if this.showMessageSettings}} +{{#if this.currentUser.can_send_private_messages}} + {{#if this.currentUser.redesigned_user_page_nav_enabled}} + + {{/if}} +
diff --git a/app/assets/javascripts/discourse/tests/acceptance/preferences-test.js b/app/assets/javascripts/discourse/tests/acceptance/preferences-test.js index 38891cc8e94..f0499b3984d 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/preferences-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/preferences-test.js @@ -91,6 +91,7 @@ acceptance("User Preferences", function (needs) { "/u/eviltrout/preferences/account", "defaults to account tab" ); + assert.ok(exists(".user-preferences"), "it shows the preferences"); const savePreferences = async () => { @@ -112,25 +113,32 @@ acceptance("User Preferences", function (needs) { await savePreferences(); await click(".preferences-nav .nav-notifications a"); + await selectKit( ".control-group.notifications .combo-box.duration" ).expand(); + await selectKit( ".control-group.notifications .combo-box.duration" ).selectRowByValue(1440); + await savePreferences(); await click(".preferences-nav .nav-categories a"); + const categorySelector = selectKit( ".tracking-controls .category-selector " ); + await categorySelector.expand(); await categorySelector.fillInFilter("faq"); await savePreferences(); this.siteSettings.tagging_enabled = false; + await visit("/"); await visit("/u/eviltrout/preferences"); + assert.ok( !exists(".preferences-nav .nav-tags a"), "tags tab isn't there when tags are disabled" @@ -564,7 +572,7 @@ acceptance("Ignored users", function (needs) { }); }); -acceptance("Security", function (needs) { +acceptance("User Preferences - Security", function (needs) { needs.user(); needs.pretender(preferencesPretender); diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-preferences-new-menu-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-preferences-new-menu-test.js new file mode 100644 index 00000000000..64fc8f8f836 --- /dev/null +++ b/app/assets/javascripts/discourse/tests/acceptance/user-preferences-new-menu-test.js @@ -0,0 +1,60 @@ +import { acceptance, exists } from "discourse/tests/helpers/qunit-helpers"; +import { click, visit } from "@ember/test-helpers"; +import { test } from "qunit"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; + +acceptance( + "New User Menu - Horizontal nav and preferences relocation", + function (needs) { + needs.user({ + redesigned_user_page_nav_enabled: true, + user_api_keys: [ + { + id: 1, + application_name: "Discourse Hub", + scopes: ["Read and clear notifications"], + created_at: "2020-11-14T00:57:09.093Z", + last_used_at: "2022-09-22T18:55:41.672Z", + }, + ], + }); + + test("Horizontal user nav exists", async function (assert) { + await visit("/u/eviltrout/preferences"); + assert.ok(exists(".horizontal-overflow-nav"), "horizontal nav exists"); + }); + + test("User Tracking page exists", async function (assert) { + await visit("/u/eviltrout/preferences"); + assert.ok(exists(".nav-tracking"), "the new tracking page link exists"); + }); + + test("User Categories page no longer exists", async function (assert) { + await visit("/u/eviltrout/preferences"); + assert.ok(!exists(".nav-categories"), "Categories tab no longer exists"); + }); + + test("Can save category tracking preferences", async function (assert) { + await visit("/u/eviltrout/preferences/tracking"); + + const categorySelector = selectKit( + ".tracking-controls .category-selector" + ); + + const savePreferences = async () => { + assert.notOk(exists(".saved"), "it hasn't been saved yet"); + await click(".save-changes"); + assert.ok(exists(".saved"), "it displays the saved message"); + }; + + await categorySelector.expand(); + await categorySelector.fillInFilter("faq"); + await savePreferences(); + }); + + test("Can view user api keys on security page", async function (assert) { + await visit("/u/eviltrout/preferences/security"); + assert.ok(exists(".control-group.apps"), "User can see apps section"); + }); + } +); diff --git a/app/assets/stylesheets/common/base/new-user.scss b/app/assets/stylesheets/common/base/new-user.scss index 3b6374ab199..ff1fb59dd45 100644 --- a/app/assets/stylesheets/common/base/new-user.scss +++ b/app/assets/stylesheets/common/base/new-user.scss @@ -184,3 +184,26 @@ margin: 1em 0; } } + +.user-preferences-tracking-page { + .user-preferences .form-vertical { + width: 100%; + } +} + +.user-preferences_tracking-topics-wrapper { + margin-bottom: 3em; + .control-label { + margin-bottom: 1em; + } +} + +.user-preferences_tracking-categories-tags-wrapper { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(16em, 1fr)); + gap: 2em; + .control-group { + width: 100%; + min-width: 16em; + } +} diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index ebd5a1519d3..df210f42a95 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1326,6 +1326,7 @@ en: profile: "Profile" emails: "Emails" notifications: "Notifications" + tracking: "Tracking" categories: "Categories" users: "Users" tags: "Tags" @@ -1604,6 +1605,7 @@ en: other_settings: "Other" categories_settings: "Categories" + topics_settings: "Topics" new_topic_duration: label: "Consider topics new when" diff --git a/config/routes.rb b/config/routes.rb index 22e73895078..3b36ba31d88 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -494,6 +494,7 @@ Discourse::Application.routes.draw do put "#{root_path}/:username/preferences/primary-email" => "users#update_primary_email", format: :json, constraints: { username: RouteFormat.username } delete "#{root_path}/:username/preferences/email" => "users#destroy_email", constraints: { username: RouteFormat.username } get "#{root_path}/:username/preferences/notifications" => "users#preferences", constraints: { username: RouteFormat.username } + get "#{root_path}/:username/preferences/tracking" => "users#preferences", constraints: { username: RouteFormat.username } get "#{root_path}/:username/preferences/categories" => "users#preferences", constraints: { username: RouteFormat.username } get "#{root_path}/:username/preferences/users" => "users#preferences", constraints: { username: RouteFormat.username } get "#{root_path}/:username/preferences/tags" => "users#preferences", constraints: { username: RouteFormat.username }