-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Improve styling and wording of SSO redirect confirm template #9272
Changes from 4 commits
f24f540
868f224
70df7d6
7175e5f
0e064ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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. |
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; | ||
} |
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 %} --> | ||
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. Why putting this in HTML comment tags? 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. to make it it easier to develop outside the template engine, I believe. 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. I've never seen this pattern before. What makes it easier to develop without these? We don't seem to do this in any other templates. Personally I find it makes my eyes ignore the Jinja logic. |
||
<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> |
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.