mirror of
				https://git.sr.ht/~tsileo/microblog.pub
				synced 2025-06-05 21:59:23 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			44 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {%- import "utils.html" as utils with context -%}
 | |
| {% extends "layout.html" %}
 | |
| {% block content %}
 | |
| 
 | |
| {% if show_filters %}
 | |
| {{ utils.display_box_filters("admin_inbox") }}
 | |
| {% endif %}
 | |
| 
 | |
| {% macro actor_action(inbox_object, text) %}
 | |
|     <div class="actor-action">
 | |
|         <a href="{{ url_for("admin_profile") }}?actor_id={{ inbox_object.actor.ap_id }}">{{ inbox_object.actor.display_name }}</a> {{ text }}
 | |
|         <span>{{ inbox_object.ap_published_at | timeago }}</span>
 | |
|     </div>
 | |
| 
 | |
| {% endmacro %}
 | |
| 
 | |
| {% for inbox_object in inbox %}
 | |
| {% if inbox_object.ap_type == "Announce" %}
 | |
|     {{ actor_action(inbox_object, "shared") }}
 | |
|     {{ utils.display_object(inbox_object.relates_to_anybox_object) }}
 | |
| {% elif inbox_object.ap_type in ["Article", "Note", "Video"] %}
 | |
| {{ utils.display_object(inbox_object) }}
 | |
| {% elif inbox_object.ap_type == "Follow" %}
 | |
|     {{ actor_action(inbox_object, "followed you") }}
 | |
|     {{ utils.display_actor(inbox_object.actor, actors_metadata) }}
 | |
| {% elif inbox_object.ap_type == "Like" %}
 | |
|     {{ actor_action(inbox_object, "liked one of your post") }}
 | |
|     {{ utils.display_object(inbox_object.relates_to_anybox_object) }}
 | |
| {% else %}
 | |
|     <p>
 | |
|     Implement {{ inbox_object.ap_type }}
 | |
|     {{ inbox_object.ap_object }}
 | |
|     </p>
 | |
| {% endif %}
 | |
| {% endfor %}
 | |
| 
 | |
| {% if next_cursor %}
 | |
| <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>
 | |
| {% endif %}
 | |
| 
 | |
| {% endblock %}
 |