{%- import "utils.html" as utils with context -%} {% extends "layout.html" %} {% block head %} {{ local_actor.display_name }} - Notifications {% endblock %} {% macro notif_actor_action(notif, text, with_icon=False) %}
{% if with_icon %}{{ utils.display_tiny_actor_icon(notif.actor) }}{% endif %} {{ notif.actor.display_name | clean_html(notif.actor) | safe }} {{ text }} {{ notif.created_at | timeago }}
{% endmacro %} {% block content %}

Notifications

{%- for notif in notifications %}
{%- if notif.notification_type.value == "new_follower" %} {{ notif_actor_action(notif, "followed you") }} {{ utils.display_actor(notif.actor, actors_metadata) }} {%- elif notif.notification_type.value == "pending_incoming_follower" %} {{ notif_actor_action(notif, "sent a follow request") }} {{ utils.display_actor(notif.actor, actors_metadata, pending_incoming_follow_notif=notif) }} {% elif notif.notification_type.value == "rejected_follower" %} {% elif notif.notification_type.value == "unfollow" %} {{ notif_actor_action(notif, "unfollowed you") }} {{ utils.display_actor(notif.actor, actors_metadata) }} {%- elif notif.notification_type.value == "follow_request_accepted" %} {{ notif_actor_action(notif, "accepted your follow request") }} {{ utils.display_actor(notif.actor, actors_metadata) }} {%- elif notif.notification_type.value == "follow_request_rejected" %} {{ notif_actor_action(notif, "rejected your follow request") }} {{ utils.display_actor(notif.actor, actors_metadata) }} {% elif notif.notification_type.value == "blocked" %} {{ notif_actor_action(notif, "blocked you") }} {{ utils.display_actor(notif.actor, actors_metadata) }} {% elif notif.notification_type.value == "unblocked" %} {{ notif_actor_action(notif, "unblocked you") }} {{ utils.display_actor(notif.actor, actors_metadata) }} {% elif notif.notification_type.value == "block" %} {{ notif_actor_action(notif, "was blocked") }} {{ utils.display_actor(notif.actor, actors_metadata) }} {% elif notif.notification_type.value == "unblock" %} {{ notif_actor_action(notif, "was unblocked") }} {{ utils.display_actor(notif.actor, actors_metadata) }} {%- elif notif.notification_type.value == "move" %} {# for move notif, the actor is the target and the inbox object the Move activity #} {{ utils.display_actor(notif.actor) }} {% elif notif.notification_type.value == "like" %} {{ notif_actor_action(notif, "liked a post", with_icon=True) }} {{ utils.display_object(notif.outbox_object) }} {% elif notif.notification_type.value == "undo_like" %} {{ notif_actor_action(notif, "unliked a post", with_icon=True) }} {{ utils.display_object(notif.outbox_object) }} {% elif notif.notification_type.value == "announce" %} {{ notif_actor_action(notif, "shared a post", with_icon=True) }} {{ utils.display_object(notif.outbox_object) }} {% elif notif.notification_type.value == "undo_announce" %} {{ notif_actor_action(notif, "unshared a post", with_icon=True) }} {{ utils.display_object(notif.outbox_object) }} {% elif notif.notification_type.value == "mention" %} {{ notif_actor_action(notif, "mentioned you") }} {{ utils.display_object(notif.inbox_object) }} {% elif notif.notification_type.value == "new_webmention" %}
new webmention from {% set facepile_item = notif.webmention.as_facepile_item %} {% if facepile_item %} {{ facepile_item.actor_name }} {% endif %} {{ notif.webmention.source }}
{{ utils.display_object(notif.outbox_object) }} {% elif notif.notification_type.value == "updated_webmention" %}
updated webmention from {% set facepile_item = notif.webmention.as_facepile_item %} {% if facepile_item %} {{ facepile_item.actor_name }} {% endif %} {{ notif.webmention.source }}
{{ utils.display_object(notif.outbox_object) }} {% elif notif.notification_type.value == "deleted_webmention" %}
deleted webmention from {% set facepile_item = notif.webmention.as_facepile_item %} {% if facepile_item %} {{ facepile_item.actor_name }} {% endif %} {{ notif.webmention.source }}
{{ utils.display_object(notif.outbox_object) }} {% else %}
Implement {{ notif.notification_type }}
{%- endif %}
{%- endfor %}
{% if next_cursor %}

See more{% if more_unread_count %} ({{ more_unread_count }} unread left){% endif %}

{% endif %} {% endblock %}