mirror of
https://github.com/zulip/zulip.git
synced 2025-10-27 01:53:59 +00:00
settings: Split email notification settings.
This commit splites email notification settings in two parts - one with heading "Email message notifications" containing batchning period, message-content and organization-name settings and the other with heading "Other emails" containing login, digest and marketing emails settings. Fixes #19717.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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_checkbox
|
||||
setting_name=this
|
||||
is_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>
|
||||
|
||||
Reference in New Issue
Block a user