This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Improve styling and wording of SSO redirect confirm template #9272
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f24f540
Add extra template variables to sso_redirect_confirm template
richvdh 868f224
Improve styling and wording of SSO redirect confirm template
richvdh 70df7d6
changelog
richvdh 7175e5f
SSO redirect confirm: show avatar even if no display-name
richvdh 0e064ce
remove html comments
richvdh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Improve the user experience of setting up an account via single-sign on. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
body { | ||
font-family: "Inter", "Helvetica", "Arial", sans-serif; | ||
font-size: 14px; | ||
color: #17191C; | ||
} | ||
|
||
header { | ||
max-width: 480px; | ||
width: 100%; | ||
margin: 24px auto; | ||
text-align: center; | ||
} | ||
|
||
header p { | ||
color: #737D8C; | ||
line-height: 24px; | ||
} | ||
|
||
h1 { | ||
font-size: 24px; | ||
} | ||
|
||
h2 { | ||
font-size: 14px; | ||
} | ||
|
||
h2 img { | ||
vertical-align: middle; | ||
margin-right: 8px; | ||
width: 24px; | ||
height: 24px; | ||
} | ||
|
||
label { | ||
cursor: pointer; | ||
} | ||
|
||
main { | ||
max-width: 360px; | ||
width: 100%; | ||
margin: 24px auto; | ||
} | ||
|
||
.primary-button { | ||
border: none; | ||
text-decoration: none; | ||
padding: 12px; | ||
color: white; | ||
background-color: #418DED; | ||
font-weight: bold; | ||
display: block; | ||
border-radius: 12px; | ||
width: 100%; | ||
margin: 16px 0; | ||
cursor: pointer; | ||
text-align: center; | ||
} | ||
|
||
.profile { | ||
display: flex; | ||
justify-content: center; | ||
margin: 24px 0; | ||
} | ||
|
||
.profile .avatar { | ||
width: 36px; | ||
height: 36px; | ||
border-radius: 100%; | ||
display: block; | ||
margin-right: 8px; | ||
} | ||
|
||
.profile .display-name { | ||
font-weight: bold; | ||
margin-bottom: 4px; | ||
} | ||
.profile .user-id { | ||
color: #737D8C; | ||
} | ||
|
||
.profile .display-name, .profile .user-id { | ||
line-height: 18px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,34 @@ | |
<head> | ||
<meta charset="UTF-8"> | ||
<title>SSO redirect confirmation</title> | ||
<meta name="viewport" content="width=device-width, user-scalable=no"> | ||
<style type="text/css"> | ||
{% include "sso.css" without context %} | ||
</style> | ||
</head> | ||
<body> | ||
<p>The application at <span style="font-weight:bold">{{ display_url | e }}</span> is requesting full access to your <span style="font-weight:bold">{{ server_name }}</span> Matrix account.</p> | ||
<p>If you don't recognise this address, you should ignore this and close this tab.</p> | ||
<p> | ||
<a href="{{ redirect_url | e }}">I trust this address</a> | ||
</p> | ||
<header> | ||
{% if new_user %} | ||
<h1>Your account is now ready</h1> | ||
<p>You've made your account on {{ server_name | e }}.</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With autoescape on I don't think we should be manually escaping these as it is confusing (although it shouldn't cause an error). (Or is #9200 not on the social login branch?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
yup, that, I'm afraid. |
||
{% else %} | ||
<h1>Log in</h1> | ||
{% endif %} | ||
<p>Continue to confirm you trust <strong>{{ display_url | e }}</strong>.</p> | ||
</header> | ||
<main> | ||
{% if user_profile.avatar_url %} | ||
<div class="profile"> | ||
<img src="{{ user_profile.avatar_url | mxc_to_http(64, 64) }}" class="avatar" /> | ||
<div class="profile-details"> | ||
{% if user_profile.display_name %} | ||
<div class="display-name">{{ user_profile.display_name | e }}</div> | ||
{% endif %} | ||
<div class="user-id">{{ user_id | e }}</div> | ||
</div> | ||
</div> | ||
{% endif %} | ||
<a href="{{ redirect_url | e }}" class="primary-button">Continue</a> | ||
</main> | ||
</body> | ||
</html> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to add this to the
complete_sso_login
version as well? I'm not sure what even calls these anymore.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given it's deprecated, I'm not sure there's any value in updating it. Any modules which want to modify the value of
new_user
should call the async version.