Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
settings: Split email notification settings.
Sahil Batra6651842dc656
diff --git a/static/js/settings_config.ts b/static/js/settings_config.tsindex f4d25d05e7d..9d62333bd99 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.hbsindex 1aaabdd8653..c9759bdb10a 100644--- a/static/templates/settings/notification_settings.hbs+++ b/static/templates/settings/notification_settings.hbs@@ -102,9 +102,9 @@{{/each}}</div>- <div class="email_notifications m-10 inline-block subsection-parent">+ <div class="email_message_notifications m-10 inline-block subsection-parent">- <h3 class="inline-block">{{t "Email" }}</h3>+ <h3 class="inline-block">{{t "Email message notifications" }}</h3><div class="alert-notification"></div><label for="email_notifications_batching_period">@@ -119,13 +119,25 @@</select></div>- {{#each notification_settings.email_notification_settings}}+ {{#each notification_settings.email_message_notification_settings}}{{> settings_checkboxsetting_name=thisis_checked=(lookup ../user_settings this)label=(lookup ../settings_label this)prefix=../prefix}}{{/each}}+ </div>++ <div class="other_email_notifications m-10 inline-block subsection-parent">+ <h3 class="inline-block">{{t "Other emails" }}</h3>+ <div class="alert-notification"></div>+ {{#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}}</div></form>