mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-25 06:48:01 -05:00
Clean up oauth info bar on login page.
This commit is contained in:
@@ -818,7 +818,11 @@ class LoginPage(BoringPage):
|
||||
if u.path == '/api/v1/authorize':
|
||||
client_id = u.query_dict.get("client_id")
|
||||
self.client = client_id and OAuth2Client.get_token(client_id)
|
||||
self.infobar = self.client and ClientInfoBar(self.client, strings.oauth_login_msg)
|
||||
if self.client:
|
||||
self.infobar = ClientInfoBar(self.client,
|
||||
strings.oauth_login_msg)
|
||||
else:
|
||||
self.infobar = None
|
||||
|
||||
def content(self):
|
||||
kw = {}
|
||||
|
||||
@@ -76,7 +76,8 @@ string_dict = dict(
|
||||
cover_msg = _("you'll need to login or register to do that"),
|
||||
cover_disclaim = _("(don't worry, it only takes a few seconds)"),
|
||||
|
||||
oauth_login_msg = _("Log in or register to connect your reddit account with [%(app_name)s](%(app_about_url)s)."),
|
||||
oauth_login_msg = _(
|
||||
"Log in or register to connect your reddit account with %(app)s."),
|
||||
|
||||
login_fallback_msg = _("try using our secure login form."),
|
||||
|
||||
|
||||
@@ -5487,13 +5487,13 @@ tr.gold-accent + tr > td {
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.infobar.client-info .md {
|
||||
.infobar.client-info div {
|
||||
line-height: 48px;
|
||||
margin-left: 56px;
|
||||
}
|
||||
|
||||
.infobar.client-info .md p {
|
||||
margin: 0;
|
||||
.infobar.client-info div p {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.oauth2-authorize {
|
||||
|
||||
@@ -21,11 +21,24 @@
|
||||
###############################################################################
|
||||
|
||||
<%!
|
||||
from r2.lib.template_helpers import s3_https_if_secure
|
||||
from r2.lib.filters import safemarkdown
|
||||
from r2.lib.template_helpers import s3_https_if_secure, static
|
||||
%>
|
||||
<%namespace file="utils.html" import="img_link"/>
|
||||
<%
|
||||
icon_url = thing.client.icon_url or static('defaultapp.png')
|
||||
if thing.client.about_url:
|
||||
app = ' <a href="%s">%s</a>' % (thing.client.about_url,
|
||||
websafe(thing.client.name))
|
||||
else:
|
||||
app = ' <b>%s</b>' % websafe(thing.client.name)
|
||||
%>
|
||||
<div class="infobar ${thing.extra_class}">
|
||||
${img_link(thing.client.name, s3_https_if_secure(thing.client.icon_url), thing.client.about_url, _class="icon")}
|
||||
${unsafe(safemarkdown(thing.message % dict(app_name=thing.client.name, app_about_url=thing.client.about_url)))}
|
||||
${img_link(thing.client.name, s3_https_if_secure(icon_url),
|
||||
thing.client.about_url, _class="icon")}
|
||||
<div>
|
||||
<p>
|
||||
${unsafe(thing.message % dict(app=app))}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user