Tweak actor display

This commit is contained in:
Thomas Sileo 2022-07-27 19:36:55 +02:00
parent de2f747140
commit 4956092161
3 changed files with 11 additions and 3 deletions

View file

@ -1,7 +1,7 @@
{%- import "utils.html" as utils with context -%} {%- import "utils.html" as utils with context -%}
{% extends "layout.html" %} {% extends "layout.html" %}
{% block content %} {% block content %}
{{ utils.display_actor(actor, actors_metadata) }} {{ utils.display_actor(actor, actors_metadata, with_details=True) }}
{% for inbox_object in inbox_objects %} {% for inbox_object in inbox_objects %}
{% if inbox_object.ap_type == "Announce" %} {% if inbox_object.ap_type == "Announce" %}
{{ utils.actor_action(inbox_object, "shared") }} {{ utils.actor_action(inbox_object, "shared") }}

View file

@ -29,7 +29,7 @@
{% endif %} {% endif %}
{% if ap_object and ap_object.ap_type in actor_types %} {% if ap_object and ap_object.ap_type in actor_types %}
{{ utils.display_actor(ap_object, actors_metadata) }} {{ utils.display_actor(ap_object, actors_metadata, with_details=True) }}
{% elif ap_object %} {% elif ap_object %}
{{ utils.display_object(ap_object, actors_metadata=actors_metadata) }} {{ utils.display_object(ap_object, actors_metadata=actors_metadata) }}
{% endif %} {% endif %}

View file

@ -179,7 +179,7 @@
{% endmacro %} {% endmacro %}
{% macro display_actor(actor, actors_metadata={}, embedded=False) %} {% macro display_actor(actor, actors_metadata={}, embedded=False, with_details=False) %}
{% set metadata = actors_metadata.get(actor.ap_id) %} {% set metadata = actors_metadata.get(actor.ap_id) %}
{% if not embedded %} {% if not embedded %}
@ -195,6 +195,14 @@
<div class="actor-handle p-name">{{ actor.handle }}</div> <div class="actor-handle p-name">{{ actor.handle }}</div>
</a> </a>
</div> </div>
{% if actor.summary %}
<div class="p-note">
{{ actor.summary | clean_html(actor) | safe }}
</div>
{% endif %}
{% if is_admin and metadata %} {% if is_admin and metadata %}
<div> <div>
<nav class="flexbox actor-metadata"> <nav class="flexbox actor-metadata">