diff --git a/webapp/channels/src/components/user_settings/notifications/email_notification_setting/__snapshots__/email_notification_setting.test.tsx.snap b/webapp/channels/src/components/user_settings/notifications/email_notification_setting/__snapshots__/email_notification_setting.test.tsx.snap index 12f1aea0ea..58ca0fe931 100644 --- a/webapp/channels/src/components/user_settings/notifications/email_notification_setting/__snapshots__/email_notification_setting.test.tsx.snap +++ b/webapp/channels/src/components/user_settings/notifications/email_notification_setting/__snapshots__/email_notification_setting.test.tsx.snap @@ -30,60 +30,53 @@ exports[`components/user_settings/notifications/EmailNotificationSetting should inputs={ Array [
- - - -
- -
-
- -
+
+
+ +
+
+ +
+
-
, null, @@ -130,76 +123,65 @@ exports[`components/user_settings/notifications/EmailNotificationSetting should
- - +
- - Send email notifications - - - -
- -
-
- -
+ +
+
+ +
+
- Email notifications are sent for mentions and direct messages when you are offline or away for more than 5 minutes. + When enabled, email notifications are sent for mentions and direct messages when you are offline or away for more than 5 minutes. -
@@ -287,8 +269,8 @@ exports[`components/user_settings/notifications/EmailNotificationSetting should } section="email" @@ -306,8 +288,8 @@ exports[`components/user_settings/notifications/EmailNotificationSetting should } section="email" @@ -359,26 +341,26 @@ exports[`components/user_settings/notifications/EmailNotificationSetting should id="user.settings.notifications.email.send" /> -
- -
+
+ +
@@ -422,36 +404,31 @@ exports[`components/user_settings/notifications/EmailNotificationSetting should />
+
+ +
-
- -
- -
@@ -512,30 +489,30 @@ exports[`components/user_settings/notifications/EmailNotificationSetting should -
- -
+
+ +
@@ -587,48 +564,39 @@ exports[`components/user_settings/notifications/EmailNotificationSetting should
+
+ +
-
- -
- - Email notifications are sent for mentions and direct messages when you are offline or away for more than 5 minutes. - - - - - Notifications received over the time period selected are combined and sent in a single email. + Email notifications are sent for mentions and direct messages when you are offline or away for more than 5 minutes. If you choose to receive notifications every 15 minutes or every hour, notifications during that period will be combined into a single email.
@@ -731,60 +699,53 @@ exports[`components/user_settings/notifications/EmailNotificationSetting should inputs={ Array [
- - - -
- -
-
- -
+
+
+ +
+
+ +
+
-
, null, @@ -811,60 +772,53 @@ exports[`components/user_settings/notifications/EmailNotificationSetting should inputs={ Array [
- - - -
- -
-
- -
+
+
+ +
+
+ +
+
-
, @@ -912,60 +866,53 @@ exports[`components/user_settings/notifications/EmailNotificationSetting should inputs={ Array [
- - - -
- -
-
- -
+
+
+ +
+
+ +
+
-
, null, diff --git a/webapp/channels/src/components/user_settings/notifications/email_notification_setting/email_notification_setting.tsx b/webapp/channels/src/components/user_settings/notifications/email_notification_setting/email_notification_setting.tsx index e16895e992..f64caf8ebf 100644 --- a/webapp/channels/src/components/user_settings/notifications/email_notification_setting/email_notification_setting.tsx +++ b/webapp/channels/src/components/user_settings/notifications/email_notification_setting/email_notification_setting.tsx @@ -191,12 +191,21 @@ export default class EmailNotificationSetting extends React.PureComponent - ); + if (this.props.enableEmailBatching) { + description = ( + + ); + } else { + description = ( + + ); + } break; case Preferences.INTERVAL_HOUR: description = ( @@ -216,19 +225,29 @@ export default class EmailNotificationSetting extends React.PureComponent + ) : ( + ); } } else { - description = ( + description = this.props.enableEmailBatching ? ( + ) : ( + ); } @@ -277,11 +296,29 @@ export default class EmailNotificationSetting extends React.PureComponent +
+ +
+
+ +
); - batchingInfo = ( + emailInfo = ( + ); + + emailTitle = ( // Renders only in case emails are batched + + + + ); + } else { + emailOptions = ( +
+
+ +
+
+ +
+
+ ); + + emailInfo = ( + ); } @@ -364,54 +473,10 @@ export default class EmailNotificationSetting extends React.PureComponent - - - -
- -
- {batchingOptions} -
- -
+ {emailTitle} + {emailOptions}
- - {' '} - {batchingInfo} + {emailInfo}
, threadsNotificationSelection, diff --git a/webapp/channels/src/i18n/en.json b/webapp/channels/src/i18n/en.json index 47ef6f785b..f218f0c700 100644 --- a/webapp/channels/src/i18n/en.json +++ b/webapp/channels/src/i18n/en.json @@ -5839,16 +5839,18 @@ "user.settings.notifications.desktopNotificationSound.soundUpstairs": "Upstairs", "user.settings.notifications.desktopNotificationSound.soundUrgent": "Urgent", "user.settings.notifications.desktopNotificationSounds.title": "Desktop notification sounds", + "user.settings.notifications.email.asSoonAsYouAreAwayForFiveMinutes": "As soon as you’re away for 5 minutes", "user.settings.notifications.email.disabled": "Email notifications are not enabled", "user.settings.notifications.email.disabled_long": "Email notifications have not been enabled by your System Administrator.", "user.settings.notifications.email.everyHour": "Every hour", "user.settings.notifications.email.everyXMinutes": "Every {count, plural, one {minute} other {{count, number} minutes}}", - "user.settings.notifications.email.immediately": "Immediately", "user.settings.notifications.email.never": "Never", "user.settings.notifications.email.notifyForthreads": "Notify me about replies to threads I’m following", + "user.settings.notifications.email.off": "Off", + "user.settings.notifications.email.on": "On", "user.settings.notifications.email.send": "Send email notifications", - "user.settings.notifications.emailBatchingInfo": "Notifications received over the time period selected are combined and sent in a single email.", - "user.settings.notifications.emailInfo": "Email notifications are sent for mentions and direct messages when you are offline or away for more than 5 minutes.", + "user.settings.notifications.emailBatchingInfo": "Email notifications are sent for mentions and direct messages when you are offline or away for more than 5 minutes. If you choose to receive notifications every 15 minutes or every hour, notifications during that period will be combined into a single email.", + "user.settings.notifications.emailInfo": "When enabled, email notifications are sent for mentions and direct messages when you are offline or away for more than 5 minutes.", "user.settings.notifications.emailNotifications": "Email notifications", "user.settings.notifications.header": "Notifications", "user.settings.notifications.icon": "Notification Settings Icon",