Template fixes

main
Thomas Sileo 2022-08-18 20:53:51 +02:00
parent 2d28ca3614
commit d3b7f6ccbb
4 changed files with 16 additions and 3 deletions

View File

@ -79,13 +79,11 @@ _RESIZED_CACHE: MutableMapping[tuple[str, int], tuple[bytes, str, Any]] = LFUCac
# - fix issue with followers from a blocked server (skip it?)
# - CORS webfinger endpoint
# - allow to share old notes
# - allow to interact with object not in anybox (i.e. like from a lookup)
# - only show 10 most recent threads in DMs
# - prevent double accept/double follow
# - UI support for updating posts
# - indieauth tweaks
# - API for posting notes
# - allow to block servers
# - FT5 text search
# - support update post with history?
# - cleanup tasks
@ -435,6 +433,7 @@ async def following(
select(models.Following)
.options(joinedload(models.Following.actor))
.order_by(models.Following.created_at.desc())
.limit(20)
)
)
.unique()
@ -815,7 +814,7 @@ async def wellknown_webfinger(resource: str) -> JSONResponse:
{
"rel": "http://webfinger.net/rel/profile-page",
"type": "text/html",
"href": ID,
"href": ID + "/",
},
{"rel": "self", "type": "application/activity+json", "href": ID},
{

View File

@ -16,7 +16,9 @@
{% set x_more = followers_count - followers | length %}
{% if x_more > 0 %}
<div class="box">
<p>And {{ x_more }} more.</p>
</div>
{% endif %}
{% if is_admin %}

View File

@ -16,7 +16,9 @@
{% set x_more = following_count - following | length %}
{% if x_more > 0 %}
<div class="box">
<p>And {{ x_more }} more.</p>
</div>
{% endif %}
{% if is_admin %}

View File

@ -577,6 +577,11 @@
<img src="{{ like.actor.resized_icon_url }}" alt="{{ like.actor.handle}}" style="max-width:50px;">
</a>
{% endfor %}
{% if object.likes_count > likes | length %}
<div style="display:inline-block;align-self:center;">
and {{ object.likes_count - likes | length }} more.
</div>
{% endif %}
</div>
</div>
{% endif %}
@ -589,6 +594,11 @@
<img src="{{ share.actor.resized_icon_url }}" alt="{{ share.actor.handle}}" style="max-width:50px;">
</a>
{% endfor %}
{% if object.announces_count > shares | length %}
<div style="display:inline-block;align-self:center;">
and {{ object.announces_count - shares | length }} more.
</div>
{% endif %}
</div>
</div>
{% endif %}