diff --git a/app/views/application/mailer/_heading.html.haml b/app/views/application/mailer/_heading.html.haml index 9fc5dc7471..8b1f3f9ffc 100644 --- a/app/views/application/mailer/_heading.html.haml +++ b/app/views/application/mailer/_heading.html.haml @@ -1,13 +1,13 @@ +-# locals: (title:, image_url: nil, subtitle: nil) %table.email-w-full.email-header-heading-table{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-header-heading-td %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr - - if defined?(heading_image_url) + - if image_url %td.email-header-heading-img-td - = image_tag heading_image_url, alt: '', width: 56, height: 56 + = image_tag image_url, alt: '', width: 56, height: 56 %td.email-header-heading-txt-td - - if defined?(heading_title) - %h1= heading_title - - if defined?(heading_subtitle) - %p= heading_subtitle + %h1= title + - if subtitle + %p= subtitle diff --git a/app/views/notification_mailer/favourite.html.haml b/app/views/notification_mailer/favourite.html.haml index 62c0a39abe..ec2a048ba7 100644 --- a/app/views/notification_mailer/favourite.html.haml +++ b/app/views/notification_mailer/favourite.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('notification_mailer.favourite.title'), heading_subtitle: t('notification_mailer.favourite.body', name: @account.pretty_acct), heading_image_url: frontend_asset_url('images/mailer-new/heading/favorite.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/favorite.png'), + subtitle: t('notification_mailer.favourite.body', name: @account.pretty_acct), + title: t('notification_mailer.favourite.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/notification_mailer/follow.html.haml b/app/views/notification_mailer/follow.html.haml index 8247aa5b44..4e23f7fae7 100644 --- a/app/views/notification_mailer/follow.html.haml +++ b/app/views/notification_mailer/follow.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('notification_mailer.follow.title'), heading_subtitle: t('notification_mailer.follow.body', name: @account.pretty_acct), heading_image_url: frontend_asset_url('images/mailer-new/heading/user.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/user.png'), + subtitle: t('notification_mailer.follow.body', name: @account.pretty_acct), + title: t('notification_mailer.follow.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/notification_mailer/follow_request.html.haml b/app/views/notification_mailer/follow_request.html.haml index 9344ef7eb3..13a5cf87e8 100644 --- a/app/views/notification_mailer/follow_request.html.haml +++ b/app/views/notification_mailer/follow_request.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('notification_mailer.follow_request.title'), heading_subtitle: t('notification_mailer.follow_request.body', name: @account.pretty_acct), heading_image_url: frontend_asset_url('images/mailer-new/heading/follow.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/follow.png'), + subtitle: t('notification_mailer.follow_request.body', name: @account.pretty_acct), + title: t('notification_mailer.follow_request.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/notification_mailer/mention.html.haml b/app/views/notification_mailer/mention.html.haml index 83fa5086a6..419d0b76ea 100644 --- a/app/views/notification_mailer/mention.html.haml +++ b/app/views/notification_mailer/mention.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('notification_mailer.mention.title'), heading_subtitle: t('notification_mailer.mention.body', name: @status.account.pretty_acct), heading_image_url: frontend_asset_url('images/mailer-new/heading/mention.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/mention.png'), + subtitle: t('notification_mailer.mention.body', name: @status.account.pretty_acct), + title: t('notification_mailer.mention.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/notification_mailer/reblog.html.haml b/app/views/notification_mailer/reblog.html.haml index f91c678cf5..f097211bc5 100644 --- a/app/views/notification_mailer/reblog.html.haml +++ b/app/views/notification_mailer/reblog.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('notification_mailer.reblog.title'), heading_subtitle: t('notification_mailer.reblog.body', name: @account.pretty_acct), heading_image_url: frontend_asset_url('images/mailer-new/heading/boost.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/boost.png'), + subtitle: t('notification_mailer.reblog.body', name: @account.pretty_acct), + title: t('notification_mailer.reblog.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/appeal_approved.html.haml b/app/views/user_mailer/appeal_approved.html.haml index 54e9a94a54..2da3e0d3eb 100644 --- a/app/views/user_mailer/appeal_approved.html.haml +++ b/app/views/user_mailer/appeal_approved.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('user_mailer.appeal_approved.title'), heading_subtitle: t('user_mailer.appeal_approved.subtitle'), heading_image_url: frontend_asset_url('images/mailer-new/heading/appeal-approved.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/appeal-approved.png'), + subtitle: t('user_mailer.appeal_approved.subtitle'), + title: t('user_mailer.appeal_approved.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/appeal_rejected.html.haml b/app/views/user_mailer/appeal_rejected.html.haml index b493712b05..6f9282507b 100644 --- a/app/views/user_mailer/appeal_rejected.html.haml +++ b/app/views/user_mailer/appeal_rejected.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('user_mailer.appeal_rejected.title'), heading_subtitle: t('user_mailer.appeal_rejected.subtitle'), heading_image_url: frontend_asset_url('images/mailer-new/heading/appeal-rejected.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/appeal-rejected.png'), + subtitle: t('user_mailer.appeal_rejected.subtitle'), + title: t('user_mailer.appeal_rejected.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/backup_ready.html.haml b/app/views/user_mailer/backup_ready.html.haml index 99a48e7fdb..c25f0b45dd 100644 --- a/app/views/user_mailer/backup_ready.html.haml +++ b/app/views/user_mailer/backup_ready.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('user_mailer.backup_ready.title'), heading_subtitle: t('user_mailer.backup_ready.explanation'), heading_image_url: frontend_asset_url('images/mailer-new/heading/archive.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/archive.png'), + subtitle: t('user_mailer.backup_ready.explanation'), + title: t('user_mailer.backup_ready.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/confirmation_instructions.html.haml b/app/views/user_mailer/confirmation_instructions.html.haml index 13e68c722b..d3e3e8f930 100644 --- a/app/views/user_mailer/confirmation_instructions.html.haml +++ b/app/views/user_mailer/confirmation_instructions.html.haml @@ -1,5 +1,7 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('devise.mailer.confirmation_instructions.title'), heading_image_url: frontend_asset_url('images/mailer-new/heading/email.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/email.png'), + title: t('devise.mailer.confirmation_instructions.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/email_changed.html.haml b/app/views/user_mailer/email_changed.html.haml index 71678ad029..33e35a314b 100644 --- a/app/views/user_mailer/email_changed.html.haml +++ b/app/views/user_mailer/email_changed.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('devise.mailer.email_changed.title'), heading_subtitle: t('devise.mailer.email_changed.explanation'), heading_image_url: frontend_asset_url('images/mailer-new/heading/email.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/email.png'), + subtitle: t('devise.mailer.email_changed.explanation'), + title: t('devise.mailer.email_changed.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/failed_2fa.html.haml b/app/views/user_mailer/failed_2fa.html.haml index e1da35ce06..edac8ef63b 100644 --- a/app/views/user_mailer/failed_2fa.html.haml +++ b/app/views/user_mailer/failed_2fa.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('user_mailer.failed_2fa.title'), heading_subtitle: t('user_mailer.failed_2fa.explanation'), heading_image_url: frontend_asset_url('images/mailer-new/heading/login.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/login.png'), + subtitle: t('user_mailer.failed_2fa.explanation'), + title: t('user_mailer.failed_2fa.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/password_change.html.haml b/app/views/user_mailer/password_change.html.haml index 44c8c0dcaf..350f5bd996 100644 --- a/app/views/user_mailer/password_change.html.haml +++ b/app/views/user_mailer/password_change.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('devise.mailer.password_change.title'), heading_subtitle: t('devise.mailer.password_change.explanation'), heading_image_url: frontend_asset_url('images/mailer-new/heading/password.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/password.png'), + subtitle: t('devise.mailer.password_change.explanation'), + title: t('devise.mailer.password_change.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/reconfirmation_instructions.html.haml b/app/views/user_mailer/reconfirmation_instructions.html.haml index 854887a7e0..6f6954f705 100644 --- a/app/views/user_mailer/reconfirmation_instructions.html.haml +++ b/app/views/user_mailer/reconfirmation_instructions.html.haml @@ -1,5 +1,7 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('devise.mailer.reconfirmation_instructions.title'), heading_image_url: frontend_asset_url('images/mailer-new/heading/email.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/email.png'), + title: t('devise.mailer.reconfirmation_instructions.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/reset_password_instructions.html.haml b/app/views/user_mailer/reset_password_instructions.html.haml index a1384fcc27..5a1480867c 100644 --- a/app/views/user_mailer/reset_password_instructions.html.haml +++ b/app/views/user_mailer/reset_password_instructions.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('devise.mailer.reset_password_instructions.title'), heading_subtitle: t('devise.mailer.reset_password_instructions.explanation'), heading_image_url: frontend_asset_url('images/mailer-new/heading/password.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/password.png'), + subtitle: t('devise.mailer.reset_password_instructions.explanation'), + title: t('devise.mailer.reset_password_instructions.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/suspicious_sign_in.html.haml b/app/views/user_mailer/suspicious_sign_in.html.haml index deee7a1ce1..890d883c44 100644 --- a/app/views/user_mailer/suspicious_sign_in.html.haml +++ b/app/views/user_mailer/suspicious_sign_in.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('user_mailer.suspicious_sign_in.title'), heading_subtitle: t('user_mailer.suspicious_sign_in.explanation'), heading_image_url: frontend_asset_url('images/mailer-new/heading/login.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/login.png'), + subtitle: t('user_mailer.suspicious_sign_in.explanation'), + title: t('user_mailer.suspicious_sign_in.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/two_factor_disabled.html.haml b/app/views/user_mailer/two_factor_disabled.html.haml index 28f6ca6600..4f1559d86c 100644 --- a/app/views/user_mailer/two_factor_disabled.html.haml +++ b/app/views/user_mailer/two_factor_disabled.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('devise.mailer.two_factor_disabled.title'), heading_subtitle: t('devise.mailer.two_factor_disabled.subtitle'), heading_image_url: frontend_asset_url('images/mailer-new/heading/2fa-disabled.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/2fa-disabled.png'), + subtitle: t('devise.mailer.two_factor_disabled.subtitle'), + title: t('devise.mailer.two_factor_disabled.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/two_factor_enabled.html.haml b/app/views/user_mailer/two_factor_enabled.html.haml index 691dc661a0..0ed57ea32b 100644 --- a/app/views/user_mailer/two_factor_enabled.html.haml +++ b/app/views/user_mailer/two_factor_enabled.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('devise.mailer.two_factor_enabled.title'), heading_subtitle: t('devise.mailer.two_factor_enabled.subtitle'), heading_image_url: frontend_asset_url('images/mailer-new/heading/2fa-enabled.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/2fa-enabled.png'), + subtitle: t('devise.mailer.two_factor_enabled.subtitle'), + title: t('devise.mailer.two_factor_enabled.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/two_factor_recovery_codes_changed.html.haml b/app/views/user_mailer/two_factor_recovery_codes_changed.html.haml index 2d063e4c76..cc4c21b83b 100644 --- a/app/views/user_mailer/two_factor_recovery_codes_changed.html.haml +++ b/app/views/user_mailer/two_factor_recovery_codes_changed.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('devise.mailer.two_factor_recovery_codes_changed.title'), heading_subtitle: t('devise.mailer.two_factor_recovery_codes_changed.subtitle'), heading_image_url: frontend_asset_url('images/mailer-new/heading/2fa-recovery.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/2fa-recovery.png'), + subtitle: t('devise.mailer.two_factor_recovery_codes_changed.subtitle'), + title: t('devise.mailer.two_factor_recovery_codes_changed.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/warning.html.haml b/app/views/user_mailer/warning.html.haml index 837cde550e..fe8db974ee 100644 --- a/app/views/user_mailer/warning.html.haml +++ b/app/views/user_mailer/warning.html.haml @@ -1,5 +1,7 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t("user_mailer.warning.title.#{@warning.action}"), heading_image_url: frontend_asset_url('images/mailer-new/heading/warning.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/warning.png'), + title: t("user_mailer.warning.title.#{@warning.action}") %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/webauthn_credential_added.html.haml b/app/views/user_mailer/webauthn_credential_added.html.haml index 3e16766238..9c5cbdd676 100644 --- a/app/views/user_mailer/webauthn_credential_added.html.haml +++ b/app/views/user_mailer/webauthn_credential_added.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('devise.mailer.webauthn_credential.added.title'), heading_subtitle: t('devise.mailer.webauthn_credential.added.explanation'), heading_image_url: frontend_asset_url('images/mailer-new/heading/key-added.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/key-added.png'), + subtitle: t('devise.mailer.webauthn_credential.added.explanation'), + title: t('devise.mailer.webauthn_credential.added.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/webauthn_credential_deleted.html.haml b/app/views/user_mailer/webauthn_credential_deleted.html.haml index 59dcb75d3a..decfc02c22 100644 --- a/app/views/user_mailer/webauthn_credential_deleted.html.haml +++ b/app/views/user_mailer/webauthn_credential_deleted.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('devise.mailer.webauthn_credential.deleted.title'), heading_subtitle: t('devise.mailer.webauthn_credential.deleted.explanation'), heading_image_url: frontend_asset_url('images/mailer-new/heading/key-deleted.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/key-deleted.png'), + subtitle: t('devise.mailer.webauthn_credential.deleted.explanation'), + title: t('devise.mailer.webauthn_credential.deleted.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/webauthn_disabled.html.haml b/app/views/user_mailer/webauthn_disabled.html.haml index 0f7c534bc4..232c951915 100644 --- a/app/views/user_mailer/webauthn_disabled.html.haml +++ b/app/views/user_mailer/webauthn_disabled.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('devise.mailer.webauthn_disabled.title'), heading_subtitle: t('devise.mailer.webauthn_disabled.explanation'), heading_image_url: frontend_asset_url('images/mailer-new/heading/key-disabled.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/key-disabled.png'), + subtitle: t('devise.mailer.webauthn_disabled.explanation'), + title: t('devise.mailer.webauthn_disabled.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/webauthn_enabled.html.haml b/app/views/user_mailer/webauthn_enabled.html.haml index cd11aa5a40..955a557de4 100644 --- a/app/views/user_mailer/webauthn_enabled.html.haml +++ b/app/views/user_mailer/webauthn_enabled.html.haml @@ -1,5 +1,8 @@ = content_for :heading do - = render 'application/mailer/heading', heading_title: t('devise.mailer.webauthn_enabled.title'), heading_subtitle: t('devise.mailer.webauthn_enabled.explanation'), heading_image_url: frontend_asset_url('images/mailer-new/heading/key-enabled.png') + = render 'application/mailer/heading', + image_url: frontend_asset_url('images/mailer-new/heading/key-enabled.png'), + subtitle: t('devise.mailer.webauthn_enabled.explanation'), + title: t('devise.mailer.webauthn_enabled.title') %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %tr %td.email-body-padding-td diff --git a/app/views/user_mailer/welcome.html.haml b/app/views/user_mailer/welcome.html.haml index efc6cad393..c37104da79 100644 --- a/app/views/user_mailer/welcome.html.haml +++ b/app/views/user_mailer/welcome.html.haml @@ -1,7 +1,9 @@ = content_for :heading do .email-desktop-flex .email-header-left - = render 'application/mailer/heading', heading_title: t('user_mailer.welcome.title', name: @resource.account.username), heading_subtitle: t('user_mailer.welcome.explanation') + = render 'application/mailer/heading', + subtitle: t('user_mailer.welcome.explanation'), + title: t('user_mailer.welcome.title', name: @resource.account.username) .email-header-right .email-header-card %table.email-header-card-table{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }