mirror of
				https://git.sr.ht/~tsileo/microblog.pub
				synced 2025-06-05 21:59:23 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			99 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			99 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{%- import "utils.html" as utils with context -%}
 | 
						|
{% extends "layout.html" %}
 | 
						|
 | 
						|
{% block head %}
 | 
						|
<title>{{ local_actor.display_name }} - Notifications</title>
 | 
						|
{% endblock %}
 | 
						|
 | 
						|
{% block content %}
 | 
						|
    <div class="box">
 | 
						|
    <h2>Notifications</h2>
 | 
						|
    </div>
 | 
						|
    <div id="notifications">
 | 
						|
    {%- for notif in notifications %}
 | 
						|
    <div>
 | 
						|
            {%- if notif.notification_type.value == "new_follower" %}
 | 
						|
                <div class="actor-action" title="{{ notif.created_at.isoformat() }}">
 | 
						|
                    <a style="font-weight:bold;" href="{{ notif.actor.url }}">{{ notif.actor.display_name }}</a> followed you
 | 
						|
                </div>
 | 
						|
                {{ utils.display_actor(notif.actor, actors_metadata) }}
 | 
						|
            {% elif notif.notification_type.value == "unfollow" %}
 | 
						|
                <div class="actor-action" title="{{ notif.created_at.isoformat() }}">
 | 
						|
                    <a style="font-weight:bold;" href="{{ notif.actor.url }}">{{ notif.actor.display_name }}</a> unfollowed you
 | 
						|
                </div>
 | 
						|
                {{ utils.display_actor(notif.actor, actors_metadata) }}
 | 
						|
            {%- elif notif.notification_type.value == "follow_request_accepted" %}
 | 
						|
                <div class="actor-action" title="{{ notif.created_at.isoformat() }}">
 | 
						|
                    <a style="font-weight:bold;" href="{{ notif.actor.url }}">{{ notif.actor.display_name }}</a> accepted your follow request
 | 
						|
                </div>
 | 
						|
                {{ utils.display_actor(notif.actor, actors_metadata) }}
 | 
						|
            {%- elif notif.notification_type.value == "follow_request_rejected" %}
 | 
						|
                <div class="actor-action" title="{{ notif.created_at.isoformat() }}">
 | 
						|
                    <a style="font-weight:bold;" href="{{ notif.actor.url }}">{{ notif.actor.display_name }}</a> rejected your follow request
 | 
						|
                </div>
 | 
						|
                {{ utils.display_actor(notif.actor, actors_metadata) }}
 | 
						|
            {% elif notif.notification_type.value == "like" %}
 | 
						|
                <div class="actor-action" title="{{ notif.created_at.isoformat() }}">
 | 
						|
                    <a style="font-weight:bold;" href="{{ notif.actor.url }}">{{ notif.actor.display_name }}</a> liked a post
 | 
						|
                </div>
 | 
						|
                {{ utils.display_object(notif.outbox_object) }}
 | 
						|
           {% elif notif.notification_type.value == "undo_like" %}
 | 
						|
                <div class="actor-action" title="{{ notif.created_at.isoformat() }}">
 | 
						|
                    <a style="font-weight:bold;" href="{{ notif.actor.url }}">{{ notif.actor.display_name }}</a> un-liked a post
 | 
						|
                </div>
 | 
						|
                {{ utils.display_object(notif.outbox_object) }}
 | 
						|
            {% elif notif.notification_type.value == "announce" %}
 | 
						|
                <div class="actor-action" title="{{ notif.created_at.isoformat() }}">
 | 
						|
                    <a style="font-weight:bold;" href="{{ notif.actor.url }}">{{ notif.actor.display_name }}</a> boosted a post
 | 
						|
                </div>
 | 
						|
                {{ utils.display_object(notif.outbox_object) }}
 | 
						|
           {% elif notif.notification_type.value == "undo_announce" %}
 | 
						|
                <div class="actor-action" title="{{ notif.created_at.isoformat() }}">
 | 
						|
                    <a style="font-weight:bold;" href="{{ notif.actor.url }}">{{ notif.actor.display_name }}</a> un-boosted a post
 | 
						|
                </div>
 | 
						|
                {{ utils.display_object(notif.outbox_object) }}
 | 
						|
            {% elif notif.notification_type.value == "mention" %}
 | 
						|
                <div class="actor-action" title="{{ notif.created_at.isoformat() }}">
 | 
						|
                    <a style="font-weight:bold;" href="{{ notif.actor.url }}">{{ notif.actor.display_name }}</a> mentioned you
 | 
						|
                </div>
 | 
						|
                {{ utils.display_object(notif.inbox_object) }}
 | 
						|
            {% elif notif.notification_type.value == "new_webmention" %}
 | 
						|
                <div class="actor-action" title="{{ notif.created_at.isoformat() }}">
 | 
						|
                    new webmention from 
 | 
						|
                    {% set facepile_item = notif.webmention.as_facepile_item %}
 | 
						|
                    {% if facepile_item %}
 | 
						|
                        <a href="{{ facepile_item.actor_url }}">{{ facepile_item.actor_name }}</a>
 | 
						|
                    {% endif %}
 | 
						|
                    <a style="font-weight:bold;" href="{{ notif.webmention.source }}">{{ notif.webmention.source }}</a>
 | 
						|
                </div>
 | 
						|
                {{ utils.display_object(notif.outbox_object) }}
 | 
						|
            {% elif notif.notification_type.value == "updated_webmention" %}
 | 
						|
                <div class="actor-action" title="{{ notif.created_at.isoformat() }}">
 | 
						|
                    updated webmention from 
 | 
						|
                    {% set facepile_item = notif.webmention.as_facepile_item %}
 | 
						|
                    {% if facepile_item %}
 | 
						|
                        <a href="{{ facepile_item.actor_url }}">{{ facepile_item.actor_name }}</a>
 | 
						|
                    {% endif %}
 | 
						|
                    <a style="font-weight:bold;" href="{{ notif.webmention.source }}">{{ notif.webmention.source }}</a>
 | 
						|
                </div>
 | 
						|
                {{ utils.display_object(notif.outbox_object) }}
 | 
						|
            {% elif notif.notification_type.value == "deleted_webmention" %}
 | 
						|
                <div class="actor-action" title="{{ notif.created_at.isoformat() }}">
 | 
						|
                    deleted webmention from 
 | 
						|
                    {% set facepile_item = notif.webmention.as_facepile_item %}
 | 
						|
                    {% if facepile_item %}
 | 
						|
                        <a href="{{ facepile_item.actor_url }}">{{ facepile_item.actor_name }}</a>
 | 
						|
                    {% endif %}
 | 
						|
                    <a style="font-weight:bold;" href="{{ notif.webmention.source }}">{{ notif.webmention.source }}</a>
 | 
						|
                </div>
 | 
						|
                {{ utils.display_object(notif.outbox_object) }}
 | 
						|
            {% else %}
 | 
						|
            <div class="actor-action">
 | 
						|
                Implement {{ notif.notification_type }}
 | 
						|
            </div>
 | 
						|
            {%- endif %}
 | 
						|
    </div>
 | 
						|
    {%- endfor %}
 | 
						|
    </div>
 | 
						|
{% endblock %}
 |