settings: Move pm_content_in_desktop_notifications into Other notifications.

Not as nice as the previous coupling, but needed for upcoming refactors to
this page.
This commit is contained in:
Rishi Gupta 2019-04-19 15:42:32 -07:00 committed by Tim Abbott
parent 29d30ceab7
commit a501abf3a1
4 changed files with 9 additions and 15 deletions

View File

@ -98,7 +98,7 @@ function setup_settings_label() {
enable_offline_push_notifications: i18n.t("Mobile notifications"),
enable_online_push_notifications: i18n.t("Send mobile notifications even if I'm online (useful for testing)"),
enable_sounds: i18n.t("Audible desktop notifications"),
pm_content_in_desktop_notifications: i18n.t("Include content of private messages"),
pm_content_in_desktop_notifications: i18n.t("Include content of private messages in desktop notifications"),
// other_notification_settings
enable_digest_emails: i18n.t("Send digest emails when I'm away"),

View File

@ -14,10 +14,10 @@ var pm_mention_notification_settings = [
"enable_offline_email_notifications",
"enable_offline_push_notifications",
"enable_sounds",
"pm_content_in_desktop_notifications",
];
var other_notification_settings = [
"pm_content_in_desktop_notifications",
"enable_online_push_notifications",
"notification_sound",
"enable_digest_emails",
@ -109,10 +109,6 @@ exports.set_up = function () {
notification_sound_dropdown.parent().addClass("control-label-disabled");
}
});
$("#enable_desktop_notifications").change(function () {
settings_ui.disable_sub_setting_onchange(this.checked, "pm_content_in_desktop_notifications", true);
});
};
exports.update_page = function () {

View File

@ -46,13 +46,6 @@
"is_checked" page_params.enable_desktop_notifications
"label" settings_label.enable_desktop_notifications}}
{{partial "settings_checkbox"
"setting_name" "pm_content_in_desktop_notifications"
"is_checked" page_params.pm_content_in_desktop_notifications
"is_parent_setting_enabled" page_params.enable_desktop_notifications
"is_nested" true
"label" settings_label.pm_content_in_desktop_notifications}}
{{partial "settings_checkbox"
"setting_name" "enable_sounds"
"is_checked" page_params.enable_sounds
@ -75,6 +68,11 @@
<h3 class="inline-block">{{t "Other notification settings" }}</h3>
<div class="alert-notification" id="other-notify-settings-status"></div>
{{partial "settings_checkbox"
"setting_name" "pm_content_in_desktop_notifications"
"is_checked" page_params.pm_content_in_desktop_notifications
"label" settings_label.pm_content_in_desktop_notifications}}
{{partial "settings_checkbox"
"setting_name" "enable_online_push_notifications"
"is_checked" page_params.enable_online_push_notifications

View File

@ -18,8 +18,8 @@ send email notifications for `@all` or `@everyone` mentions.
You can also hide the content of private messages (and group private
messages) from desktop notifications.
Under **Visual desktop notifications**, uncheck
**Include content of private messages**.
Under **Other notification settings**, uncheck
**Include content of private messages in desktop notifications**.
## Related articles