diff --git a/static/js/settings_config.ts b/static/js/settings_config.ts index f4d25d05e7..9d62333bd9 100644 --- a/static/js/settings_config.ts +++ b/static/js/settings_config.ts @@ -441,14 +441,21 @@ export const email_notifications_batching_period_values = [ }, ]; -const email_notification_settings = [ - "enable_digest_emails", - "enable_login_emails", +const email_message_notification_settings = [ "message_content_in_email_notifications", "realm_name_in_notifications", +]; + +const other_email_settings = [ + "enable_digest_emails", + "enable_login_emails", "enable_marketing_emails", ]; +const email_notification_settings = other_email_settings.concat( + email_message_notification_settings, +); + const other_notification_settings = desktop_notification_settings.concat( ["desktop_icon_count_display"], mobile_notification_settings, @@ -503,7 +510,8 @@ export interface AllNotifications { settings: { desktop_notification_settings: string[]; mobile_notification_settings: string[]; - email_notification_settings: string[]; + email_message_notification_settings: string[]; + other_email_settings: string[]; }; show_push_notifications_tooltip: { push_notifications: boolean; @@ -527,7 +535,8 @@ export const all_notifications = (): AllNotifications => ({ settings: { desktop_notification_settings, mobile_notification_settings, - email_notification_settings, + email_message_notification_settings, + other_email_settings, }, show_push_notifications_tooltip: { push_notifications: !page_params.realm_push_notifications_enabled, diff --git a/static/templates/settings/notification_settings.hbs b/static/templates/settings/notification_settings.hbs index 1aaabdd865..c9759bdb10 100644 --- a/static/templates/settings/notification_settings.hbs +++ b/static/templates/settings/notification_settings.hbs @@ -102,9 +102,9 @@ {{/each}} -
+
-

{{t "Email" }}

+

{{t "Email message notifications" }}

- {{#each notification_settings.email_notification_settings}} + {{#each notification_settings.email_message_notification_settings}} {{> settings_checkbox setting_name=this is_checked=(lookup ../user_settings this) label=(lookup ../settings_label this) prefix=../prefix}} {{/each}} +
+
+ +

{{t "Other emails" }}

+
+ {{#each notification_settings.other_email_settings}} + {{> settings_checkbox + setting_name=this + is_checked=(lookup ../user_settings this) + label=(lookup ../settings_label this) + prefix=../prefix}} + {{/each}}