2022-06-25 01:23:28 -05:00
|
|
|
{%- import "utils.html" as utils with context -%}
|
|
|
|
{% extends "layout.html" %}
|
|
|
|
{% block content %}
|
|
|
|
|
2022-07-07 13:37:16 -05:00
|
|
|
{% if show_filters %}
|
2022-06-28 13:10:25 -05:00
|
|
|
{{ utils.display_box_filters("admin_inbox") }}
|
2022-07-07 13:37:16 -05:00
|
|
|
{% endif %}
|
2022-06-28 13:10:25 -05:00
|
|
|
|
2022-07-03 15:01:47 -05:00
|
|
|
{% macro actor_action(inbox_object, text) %}
|
|
|
|
<div class="actor-action">
|
2022-07-21 14:56:59 -05:00
|
|
|
<a href="{{ url_for("admin_profile") }}?actor_id={{ inbox_object.actor.ap_id }}">{{ inbox_object.actor.display_name | clean_html(inbox_object.actor) | safe }}</a> {{ text }}
|
2022-07-03 15:01:47 -05:00
|
|
|
<span>{{ inbox_object.ap_published_at | timeago }}</span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endmacro %}
|
2022-07-14 13:05:36 -05:00
|
|
|
|
|
|
|
{% if not inbox %}
|
|
|
|
<div class="box">
|
|
|
|
<p>Nothing to see yet, <a href="{{ url_for("get_lookup") }}">start following people in the lookup section</a>.</p>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-07-03 15:01:47 -05:00
|
|
|
|
2022-06-25 01:23:28 -05:00
|
|
|
{% for inbox_object in inbox %}
|
|
|
|
{% if inbox_object.ap_type == "Announce" %}
|
2022-07-05 01:33:39 -05:00
|
|
|
{{ actor_action(inbox_object, "shared") }}
|
2022-06-25 01:23:28 -05:00
|
|
|
{{ utils.display_object(inbox_object.relates_to_anybox_object) }}
|
2022-07-23 12:02:06 -05:00
|
|
|
{% elif inbox_object.ap_type in ["Article", "Note", "Video", "Page", "Question"] %}
|
2022-06-25 01:23:28 -05:00
|
|
|
{{ utils.display_object(inbox_object) }}
|
2022-06-25 03:20:07 -05:00
|
|
|
{% elif inbox_object.ap_type == "Follow" %}
|
2022-07-03 15:01:47 -05:00
|
|
|
{{ actor_action(inbox_object, "followed you") }}
|
2022-06-28 14:10:22 -05:00
|
|
|
{{ utils.display_actor(inbox_object.actor, actors_metadata) }}
|
2022-07-03 15:01:47 -05:00
|
|
|
{% elif inbox_object.ap_type == "Like" %}
|
|
|
|
{{ actor_action(inbox_object, "liked one of your post") }}
|
|
|
|
{{ utils.display_object(inbox_object.relates_to_anybox_object) }}
|
2022-06-25 01:23:28 -05:00
|
|
|
{% else %}
|
2022-06-30 02:25:13 -05:00
|
|
|
<p>
|
2022-06-25 01:23:28 -05:00
|
|
|
Implement {{ inbox_object.ap_type }}
|
2022-06-30 02:25:13 -05:00
|
|
|
{{ inbox_object.ap_object }}
|
|
|
|
</p>
|
2022-06-25 01:23:28 -05:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
2022-06-28 13:10:25 -05:00
|
|
|
{% if next_cursor %}
|
2022-07-09 02:33:34 -05:00
|
|
|
<div class="box">
|
|
|
|
<p><a href="{{ request.url._path }}?cursor={{ next_cursor }}{% if request.query_params.filter_by %}&filter_by={{ request.query_params.filter_by }}{% endif %}">See more</a></p>
|
|
|
|
</div>
|
2022-06-28 13:10:25 -05:00
|
|
|
{% endif %}
|
|
|
|
|
2022-06-25 01:23:28 -05:00
|
|
|
{% endblock %}
|