From 2dd132ca4480df7af52b055d4bc945536d008211 Mon Sep 17 00:00:00 2001 From: Aonrud <107251085+Aonrud@users.noreply.github.com> Date: Tue, 17 Jan 2023 13:46:13 +0000 Subject: [PATCH] feat: Style the admin lookup page --- data/templates/lookup.html | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 data/templates/lookup.html diff --git a/data/templates/lookup.html b/data/templates/lookup.html new file mode 100644 index 0000000..601a0dd --- /dev/null +++ b/data/templates/lookup.html @@ -0,0 +1,41 @@ +{%- import "utils.html" as utils with context -%} +{% extends "layout.html" %} + +{% block head %} +{{ local_actor.display_name }} - Lookup +{% endblock %} + +{% block content %} + +
+
+
+ Interact with an ActivityPub object via its URL or look for a user using @user@domain.tld + + {% if error %} +
+ + {% if error.value == "NOT_FOUND" %} + The remote object is unavailable. + {% elif error.value == "UNAUTHORIZED" %} + Missing permissions to fetch the remote object. + {% elif error.value == "TIMEOUT" %} + Lookup timed out, please try refreshing the page. + {% else %} + Unexpected error, please check the logs and report an issue if needed. + {% endif %} +
+ {% endif %} + +

+

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