add protocol logo to user page activities and followers

fixes #939

also drop page size from 30 to 20
pull/962/head
Ryan Barrett 2024-04-15 19:41:22 -07:00
rodzic 12a3bf0862
commit bf52d80e0f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
3 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -37,7 +37,7 @@ PROTOCOLS = {'ostatus': None}
# 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

Wyświetl plik

@ -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">

Wyświetl plik

@ -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 %}