Skip to content

Commit

Permalink
misc minor UI tweaks for Instagram browser extension based accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Dec 23, 2020
1 parent e4ae544 commit 754b261
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
13 changes: 8 additions & 5 deletions models.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,14 @@ def button_html(cls, feature, **kwargs):
form_extra += ('\n<input name="id" type="hidden" value="%s" />' %
source.key_id())

return cls.OAUTH_START_HANDLER.button_html(
'/%s/start' % cls.SHORT_NAME,
form_extra=form_extra,
image_prefix='/oauth_dropins/static/',
**kwargs)
if cls.OAUTH_START_HANDLER:
return cls.OAUTH_START_HANDLER.button_html(
'/%s/start' % cls.SHORT_NAME,
form_extra=form_extra,
image_prefix='/oauth_dropins/static/',
**kwargs)

return ''

@classmethod
def create_new(cls, handler, user_url=None, **kwargs):
Expand Down
2 changes: 2 additions & 0 deletions templates/social_user.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,13 @@

<!-- Listen signup buttons -->
{% else %}
{% if source.AUTO_POLL %}
<data class="p-bridgy-listen-status" value="disabled">
Click to enable <a href="/about#listen">listening</a>:
{{ source.button_html('listen', source=source)|safe }}
</data>
{% endif %}
{% endif %}

</div>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/user.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div id="user" class="row big">
{% include "profile_link.html" %}
{% if source.status == "disabled" %}
{% if source.CAN_LISTEN or source.CAN_PUBLISH %}
{% if (source.AUTO_POLL and source.CAN_LISTEN) or source.CAN_PUBLISH %}
<!-- TODO: make this work without javascript too -->
<data class="p-bridgy-account-status" value="disabled">
<a href="#" onclick="document.forms[0].submit(); return false;">
Expand Down

0 comments on commit 754b261

Please sign in to comment.