mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-26 15:28:37 -05:00
Add default app icon.
This commit is contained in:
BIN
r2/r2/public/static/defaultapp.png
Normal file
BIN
r2/r2/public/static/defaultapp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
@@ -24,11 +24,16 @@
|
||||
from r2.lib.template_helpers import static, s3_https_if_secure
|
||||
%>
|
||||
<%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")
|
||||
%>
|
||||
<div class="content oauth2-authorize">
|
||||
<div class="icon">
|
||||
|
||||
<img src="${s3_https_if_secure(thing.client.icon_url)}"
|
||||
alt="${thing.client.name} icon" />
|
||||
<img src="${icon}" alt="${thing.client.name} icon" />
|
||||
|
||||
</div>
|
||||
%if thing.client.about_url:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<%!
|
||||
from r2.lib.template_helpers import static
|
||||
%>
|
||||
|
||||
<%namespace name="utils" file="utils.html" />
|
||||
<%namespace file="utils.html" import="error_field, plain_link" />
|
||||
<%namespace file="printablebuttons.html" import="ajax_ynbutton, ynbutton" />
|
||||
@@ -5,7 +9,7 @@
|
||||
<%def name="icon(app)">
|
||||
<div class="app-icon">
|
||||
|
||||
<img src="${app.icon_url}">
|
||||
<img src="${app.icon_url or static('defaultapp.png')}">
|
||||
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
Reference in New Issue
Block a user