Skip to content

Commit

Permalink
add protocol logo to user page activities and followers
Browse files Browse the repository at this point in the history
fixes #939

also drop page size from 30 to 20
  • Loading branch information
snarfed committed Apr 16, 2024
1 parent 12a3bf0 commit bf52d80
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion models.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

# 2048 bits makes tests slow, so use 1024 for them
KEY_BITS = 1024 if DEBUG else 2048
PAGE_SIZE = 30
PAGE_SIZE = 20

# auto delete old objects of these types via the Object.expire property
# https://cloud.google.com/datastore/docs/ttl
Expand Down
3 changes: 3 additions & 0 deletions templates/_followers.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<li class="row">
{% with url=f.user.web_url(), user_as1=f.user.obj.as1 or {} %}
<a class="follower col-xs-10 col-sm-10 col-lg-6" href="{{ url }}">
<span class="logo" title="{{ user.__class__.__name__ }}">
{{ f.user.LOGO_HTML|safe }}
</span>
{% with picture=util.get_url(user_as1, 'icon') or util.get_url(user_as1, 'image') %}
{% if picture %}
<img class="profile u-photo" src="{{ picture }}" width="48px">
Expand Down
3 changes: 3 additions & 0 deletions templates/activities.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
{% for obj in objects %}
<li class="row h-entry">
<div class="e-content col-xs-{{ 5 if show_users else 8 }}">
{% if obj.source_protocol %}
<span class="logo">{{ PROTOCOLS[obj.source_protocol].LOGO_HTML|safe }}</span>
{% endif %}
{{ obj.actor_link(user=user)|safe }}
{{ obj.phrase|safe }}
{% if obj.url %}<a target="_blank" href="{{ obj.url }}" class="u-url">{% endif %}
Expand Down

0 comments on commit bf52d80

Please sign in to comment.