From 345e34b3756964699a4d330b915a90eb5c3029f5 Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Wed, 10 Aug 2022 15:33:56 +0100 Subject: [PATCH 1/6] Add viewport directive to HTML templates to optimise for mobile --- changelog.d/13493.misc | 1 + .../res/templates/account_previously_renewed.html | 13 ++++++++++++- synapse/res/templates/account_renewed.html | 13 ++++++++++++- synapse/res/templates/add_threepid.html | 11 ++++++++--- synapse/res/templates/add_threepid_failure.html | 15 ++++++++++----- synapse/res/templates/add_threepid_success.html | 14 ++++++++++---- synapse/res/templates/invalid_token.html | 13 ++++++++++++- synapse/res/templates/notice_expiry.html | 2 ++ synapse/res/templates/notif_mail.html | 2 ++ synapse/res/templates/password_reset.html | 6 +++++- .../templates/password_reset_confirmation.html | 7 +++++-- synapse/res/templates/password_reset_failure.html | 7 +++++-- synapse/res/templates/password_reset_success.html | 7 +++++-- synapse/res/templates/registration.html | 6 +++++- synapse/res/templates/registration_failure.html | 7 +++++-- synapse/res/templates/registration_success.html | 8 ++++++-- synapse/res/templates/registration_token.html | 2 +- synapse/res/templates/sso_login_idp_picker.html | 2 ++ 18 files changed, 108 insertions(+), 28 deletions(-) create mode 100644 changelog.d/13493.misc diff --git a/changelog.d/13493.misc b/changelog.d/13493.misc new file mode 100644 index 000000000000..75801396e35f --- /dev/null +++ b/changelog.d/13493.misc @@ -0,0 +1 @@ +Add viewport directive to HTML templates. \ No newline at end of file diff --git a/synapse/res/templates/account_previously_renewed.html b/synapse/res/templates/account_previously_renewed.html index b751359bdfb7..bd4f7cea97a0 100644 --- a/synapse/res/templates/account_previously_renewed.html +++ b/synapse/res/templates/account_previously_renewed.html @@ -1 +1,12 @@ -Your account is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}. + + + + + + + Your account is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}. + + + Your account is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}. + + \ No newline at end of file diff --git a/synapse/res/templates/account_renewed.html b/synapse/res/templates/account_renewed.html index e8c0f52f0542..57b319f37584 100644 --- a/synapse/res/templates/account_renewed.html +++ b/synapse/res/templates/account_renewed.html @@ -1 +1,12 @@ -Your account has been successfully renewed and is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}. + + + + + + + Your account has been successfully renewed and is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}. + + + Your account has been successfully renewed and is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}. + + \ No newline at end of file diff --git a/synapse/res/templates/add_threepid.html b/synapse/res/templates/add_threepid.html index cc4ab07e0987..71f2215b7aea 100644 --- a/synapse/res/templates/add_threepid.html +++ b/synapse/res/templates/add_threepid.html @@ -1,9 +1,14 @@ - + + + + + + + Request to add an email address to your Matrix account +

A request to add an email address to your Matrix account has been received. If this was you, please click the link below to confirm adding this email:

- {{ link }} -

If this was not you, you can safely ignore this email. Thank you.

diff --git a/synapse/res/templates/add_threepid_failure.html b/synapse/res/templates/add_threepid_failure.html index 441d11c846c2..a979a8f75ff9 100644 --- a/synapse/res/templates/add_threepid_failure.html +++ b/synapse/res/templates/add_threepid_failure.html @@ -1,8 +1,13 @@ - - + + + + + + + request failed + -

The request failed for the following reason: {{ failure_reason }}.

- -

No changes have been made to your account.

+

The request failed for the following reason: {{ failure_reason }}.

+

No changes have been made to your account.

diff --git a/synapse/res/templates/add_threepid_success.html b/synapse/res/templates/add_threepid_success.html index fbd6e4018f7d..49170c138ea0 100644 --- a/synapse/res/templates/add_threepid_success.html +++ b/synapse/res/templates/add_threepid_success.html @@ -1,6 +1,12 @@ - - + + + + + + + Your email has now been validated + -

Your email has now been validated, please return to your client. You may now close this window.

+

Your email has now been validated, please return to your client. You may now close this window.

- + \ No newline at end of file diff --git a/synapse/res/templates/invalid_token.html b/synapse/res/templates/invalid_token.html index 6bd2b9836437..2c7c384fe332 100644 --- a/synapse/res/templates/invalid_token.html +++ b/synapse/res/templates/invalid_token.html @@ -1 +1,12 @@ -Invalid renewal token. + + + + + + + Invalid renewal token. + + + Invalid renewal token. + + diff --git a/synapse/res/templates/notice_expiry.html b/synapse/res/templates/notice_expiry.html index d87311f659a5..865f9f7adab1 100644 --- a/synapse/res/templates/notice_expiry.html +++ b/synapse/res/templates/notice_expiry.html @@ -1,6 +1,8 @@ + + diff --git a/synapse/res/templates/sso_auth_account_details.html b/synapse/res/templates/sso_auth_account_details.html index cf72df0a2a39..2d1db386e1b4 100644 --- a/synapse/res/templates/sso_auth_account_details.html +++ b/synapse/res/templates/sso_auth_account_details.html @@ -3,7 +3,8 @@ Create your account - + + diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 140653574db1..27bbd76f5129 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -2,7 +2,8 @@ Registration - + + From 706f57b88735edb61f3e88b608c7499867baae04 Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Wed, 10 Aug 2022 15:55:13 +0100 Subject: [PATCH 3/6] Fix missing HTML document title --- synapse/res/templates/add_threepid_failure.html | 2 +- synapse/res/templates/password_reset_confirmation.html | 1 + synapse/res/templates/password_reset_failure.html | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/synapse/res/templates/add_threepid_failure.html b/synapse/res/templates/add_threepid_failure.html index a979a8f75ff9..bd627ee9ceca 100644 --- a/synapse/res/templates/add_threepid_failure.html +++ b/synapse/res/templates/add_threepid_failure.html @@ -4,7 +4,7 @@ - request failed + Request failed

The request failed for the following reason: {{ failure_reason }}.

diff --git a/synapse/res/templates/password_reset_confirmation.html b/synapse/res/templates/password_reset_confirmation.html index 4e8d3665f631..2e3fd2ec1e84 100644 --- a/synapse/res/templates/password_reset_confirmation.html +++ b/synapse/res/templates/password_reset_confirmation.html @@ -1,5 +1,6 @@ + Password reset confirmation diff --git a/synapse/res/templates/password_reset_failure.html b/synapse/res/templates/password_reset_failure.html index 551979f14568..2d59c463f053 100644 --- a/synapse/res/templates/password_reset_failure.html +++ b/synapse/res/templates/password_reset_failure.html @@ -1,5 +1,6 @@ + Password reset failure From 766987e6107a028789976a40f9a8628b7673afa7 Mon Sep 17 00:00:00 2001 From: Germain Date: Wed, 10 Aug 2022 15:56:03 +0100 Subject: [PATCH 4/6] Make changelog aligned with usual tone Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> --- changelog.d/13493.misc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/13493.misc b/changelog.d/13493.misc index 75801396e35f..16f53a35f491 100644 --- a/changelog.d/13493.misc +++ b/changelog.d/13493.misc @@ -1 +1 @@ -Add viewport directive to HTML templates. \ No newline at end of file +Modify HTML template content to better support mobile devices screen sizes. \ No newline at end of file From 2c1f6b62bf012088efb1561cc2d0ca5725608678 Mon Sep 17 00:00:00 2001 From: Germain Date: Wed, 10 Aug 2022 16:08:58 +0100 Subject: [PATCH 5/6] Update changelog.d/13493.misc Co-authored-by: David Robertson --- changelog.d/13493.misc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/13493.misc b/changelog.d/13493.misc index 16f53a35f491..d7d5c33a89ea 100644 --- a/changelog.d/13493.misc +++ b/changelog.d/13493.misc @@ -1 +1 @@ -Modify HTML template content to better support mobile devices screen sizes. \ No newline at end of file +Modify HTML template content to better support mobile devices' screen sizes. \ No newline at end of file From af2d6f983ced0ceccc9b80180394154c7dad7eb2 Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Wed, 10 Aug 2022 16:37:20 +0100 Subject: [PATCH 6/6] Add title to HTML pages --- synapse/res/templates/password_reset.html | 1 + synapse/res/templates/registration.html | 1 + 2 files changed, 2 insertions(+) diff --git a/synapse/res/templates/password_reset.html b/synapse/res/templates/password_reset.html index 1b152011d19e..a8bdce357b42 100644 --- a/synapse/res/templates/password_reset.html +++ b/synapse/res/templates/password_reset.html @@ -1,5 +1,6 @@ + Password reset diff --git a/synapse/res/templates/registration.html b/synapse/res/templates/registration.html index b234ac23771d..20e831ff4a65 100644 --- a/synapse/res/templates/registration.html +++ b/synapse/res/templates/registration.html @@ -1,5 +1,6 @@ + Registration