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
deleted file mode 100644
index 7fcc1ae5a52..00000000000
--- a/app/assets/javascripts/discourse/app/components/user-preferences/topic-tracking.hbs
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/assets/javascripts/discourse/app/controllers/preferences/tracking.js b/app/assets/javascripts/discourse/app/controllers/preferences/tracking.js
index acc176f58e2..1e89a02517e 100644
--- a/app/assets/javascripts/discourse/app/controllers/preferences/tracking.js
+++ b/app/assets/javascripts/discourse/app/controllers/preferences/tracking.js
@@ -10,6 +10,7 @@ export default class extends Controller {
@service currentUser;
@service siteSettings;
@tracked saved = false;
+ @tracked customAttrNames = [];
likeNotificationFrequencies = [
{ name: i18n("user.like_notification_frequency.always"), value: 0 },
@@ -53,15 +54,15 @@ export default class extends Controller {
notificationLevelsForReplying = [
{
- name: i18n("topic.notifications.watching.title"),
+ name: i18n("user.notification_level_when_replying.watch_topic"),
value: NotificationLevels.WATCHING,
},
{
- name: i18n("topic.notifications.tracking.title"),
+ name: i18n("user.notification_level_when_replying.track_topic"),
value: NotificationLevels.TRACKING,
},
{
- name: i18n("topic.notifications.regular.title"),
+ name: i18n("user.notification_level_when_replying.do_nothing"),
value: NotificationLevels.REGULAR,
},
];
@@ -154,7 +155,8 @@ export default class extends Controller {
@computed(
"siteSettings.tagging_enabled",
- "siteSettings.mute_all_categories_by_default"
+ "siteSettings.mute_all_categories_by_default",
+ "customAttrNames"
)
get saveAttrNames() {
const attrs = [
@@ -180,6 +182,10 @@ export default class extends Controller {
);
}
+ if (this.customAttrNames?.length > 0) {
+ attrs.push(...this.customAttrNames);
+ }
+
return attrs;
}
@@ -189,9 +195,7 @@ export default class extends Controller {
return this.model
.save(this.saveAttrNames)
- .then(() => {
- this.saved = true;
- })
+ .then(() => (this.saved = true))
.catch(popupAjaxError);
}
}
diff --git a/app/assets/javascripts/discourse/app/templates/preferences/tracking.hbs b/app/assets/javascripts/discourse/app/templates/preferences/tracking.hbs
index 49700bff811..05281b1ea62 100644
--- a/app/assets/javascripts/discourse/app/templates/preferences/tracking.hbs
+++ b/app/assets/javascripts/discourse/app/templates/preferences/tracking.hbs
@@ -39,7 +39,7 @@
class="controls controls-dropdown"
data-setting-name="user-notification-level-when-replying"
>
-
+
+
+