Improve notifications page (#12497)

Currently notifications page seems a bit cluttered with no clear
separation between e-mail and filtering settings. This commit tries to
address them by adding clear separation with headers, hints and removing
continuously reused texts for events checkboxes.
signup-info-prompt
Sasha Sorokin 2019-11-29 23:03:06 +07:00 committed by Eugen Rochko
parent a690b3e470
commit fd45f5bbaa
3 changed files with 18 additions and 8 deletions

View File

@ -4,6 +4,10 @@
= simple_form_for current_user, url: settings_preferences_notifications_path, html: { method: :put } do |f| = simple_form_for current_user, url: settings_preferences_notifications_path, html: { method: :put } do |f|
= render 'shared/error_messages', object: current_user = render 'shared/error_messages', object: current_user
%h4= t('notifications.email_events')
%p.hint = t('notifications.email_events_hint')
.fields-group .fields-group
= f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff| = f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff|
= ff.input :follow, as: :boolean, wrapper: :with_label = ff.input :follow, as: :boolean, wrapper: :with_label
@ -21,6 +25,8 @@
= f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff| = f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff|
= ff.input :digest, as: :boolean, wrapper: :with_label = ff.input :digest, as: :boolean, wrapper: :with_label
%h4 = t('notifications.other_settings')
.fields-group .fields-group
= f.simple_fields_for :interactions, hash_to_object(current_user.settings.interactions) do |ff| = f.simple_fields_for :interactions, hash_to_object(current_user.settings.interactions) do |ff|
= ff.input :must_be_follower, as: :boolean, wrapper: :with_label = ff.input :must_be_follower, as: :boolean, wrapper: :with_label

View File

@ -886,6 +886,10 @@ en:
body: 'Your status was boosted by %{name}:' body: 'Your status was boosted by %{name}:'
subject: "%{name} boosted your status" subject: "%{name} boosted your status"
title: New boost title: New boost
notifications:
email_events: Events for e-mail notifications
email_events_hint: 'Select events that you want to receive notifications for:'
other_settings: Other notifications settings
number: number:
human: human:
decimal_units: decimal_units:

View File

@ -150,14 +150,14 @@ en:
text: Why do you want to join? text: Why do you want to join?
notification_emails: notification_emails:
digest: Send digest e-mails digest: Send digest e-mails
favourite: Send e-mail when someone favourites your status favourite: Someone favourited your status
follow: Send e-mail when someone follows you follow: Someone followed you
follow_request: Send e-mail when someone requests to follow you follow_request: Someone requested to follow you
mention: Send e-mail when someone mentions you mention: Someone mentioned you
pending_account: Send e-mail when a new account needs review pending_account: New account needs review
reblog: Send e-mail when someone boosts your status reblog: Someone boosted your status
report: Send e-mail when a new report is submitted report: New report is submitted
trending_tag: Send e-mail when an unreviewed hashtag is trending trending_tag: An unreviewed hashtag is trending
tag: tag:
listable: Allow this hashtag to appear in searches and on the profile directory listable: Allow this hashtag to appear in searches and on the profile directory
name: Hashtag name: Hashtag