diff --git a/r2/r2/public/static/css/reddit.css b/r2/r2/public/static/css/reddit.css index fbaca04ac..b3a93be7a 100755 --- a/r2/r2/public/static/css/reddit.css +++ b/r2/r2/public/static/css/reddit.css @@ -5494,9 +5494,7 @@ tr.gold-accent + tr > td { } .oauth2-authorize h1 a { - display: block; font-weight: bold; - font-size: 1.5em; letter-spacing: -.04em; } diff --git a/r2/r2/templates/clientinfobar.html b/r2/r2/templates/clientinfobar.html index cd0e713a6..efc86f7c6 100644 --- a/r2/r2/templates/clientinfobar.html +++ b/r2/r2/templates/clientinfobar.html @@ -25,20 +25,24 @@ from r2.lib.template_helpers import s3_https_if_secure, static %> <%namespace file="utils.html" import="img_link"/> +<%def name="app_link(app)" buffered="True"> + + %if app.about_url: + ${app.name} + %else: + ${app.name} + %endif + + <% icon_url = thing.client.icon_url or static('defaultapp.png') - if thing.client.about_url: - app = ' %s' % (thing.client.about_url, - websafe(thing.client.name)) - else: - app = ' %s' % websafe(thing.client.name) %>
${img_link(thing.client.name, s3_https_if_secure(icon_url), thing.client.about_url, _class="icon")}

- ${unsafe(thing.message % dict(app=app))} + ${unsafe(websafe(thing.message) % dict(app=app_link(thing.client)))}

diff --git a/r2/r2/templates/oauth2authorization.html b/r2/r2/templates/oauth2authorization.html index adfdfd21f..eab46596a 100644 --- a/r2/r2/templates/oauth2authorization.html +++ b/r2/r2/templates/oauth2authorization.html @@ -25,13 +25,15 @@ from r2.models import OAuth2AccessToken from r2.lib.template_helpers import static, s3_https_if_secure %> +<%namespace file="clientinfobar.html" import="app_link" /> <%namespace file="prefapps.html" import="scope_details" /> -<%namespace file="utils.html" import="_md" /> <% if thing.client.icon_url: icon = s3_https_if_secure(thing.client.icon_url) else: icon = static("defaultapp.png") + app_name = ( + " %s " % websafe(thing.client.name)) %>
@@ -39,17 +41,18 @@ ${thing.client.name} icon  
- %if thing.client.about_url: - ${_md("#[%(app_name)s](%(app_about_url)s) requests to connect with your reddit account." - % dict(app_name=thing.client.name, app_about_url=thing.client.about_url))} - %else: - ${_md("#%(app_name)s requests to connect with your reddit account." - % dict(app_name=thing.client.name))} - %endif +

+ ${unsafe(_("%(app)s requests to connect with your reddit account.") + % dict(app=app_link(thing.client)))} +

-

${_("Allow %(app_name)s to:") % dict(app_name=thing.client.name)}

- ${scope_details(thing.scope)} -

${_("%(app_name)s will not be able to access your reddit password.") % dict(app_name=thing.client.name)}

+

${unsafe(_("Allow %(app)s to:") % dict(app=app_name))}

+ ${scope_details(thing.scope, expiration=thing.expiration)} +

+ ${unsafe( + _("%(app)s will not be able to access your reddit password.") + % dict(app=app_name))} +

@@ -58,8 +61,10 @@
- - + +