2022-06-22 13:11:22 -05:00
|
|
|
{%- import "utils.html" as utils with context -%}
|
|
|
|
{% extends "layout.html" %}
|
2022-07-15 13:01:55 -05:00
|
|
|
|
|
|
|
{% block head %}
|
|
|
|
<title>{{ local_actor.display_name }} - Lookup</title>
|
|
|
|
{% endblock %}
|
|
|
|
|
2022-06-22 13:11:22 -05:00
|
|
|
{% block content %}
|
2022-06-26 04:09:43 -05:00
|
|
|
|
2022-07-09 01:15:33 -05:00
|
|
|
<div class="box">
|
2022-06-26 04:09:43 -05:00
|
|
|
<p>Interact with an ActivityPub object via its URL or look for a user using <i>@user@domain.tld</i></p>
|
|
|
|
|
2022-07-03 15:01:47 -05:00
|
|
|
<form class="form" action="{{ url_for("get_lookup") }}" method="GET">
|
2022-07-04 12:02:30 -05:00
|
|
|
<input type="text" name="query" value="{{ query if query else "" }}" autofocus>
|
2022-06-22 13:11:22 -05:00
|
|
|
<input type="submit" value="Lookup">
|
|
|
|
</form>
|
2022-07-09 01:15:33 -05:00
|
|
|
</div>
|
|
|
|
|
2022-07-26 11:51:20 -05:00
|
|
|
{% if error %}
|
|
|
|
<div class="box error-box">
|
|
|
|
{% if error.value == "NOT_FOUND" %}
|
2022-08-29 22:40:20 -05:00
|
|
|
<p>The remote object is unavailable.</p>
|
2022-09-12 01:04:16 -05:00
|
|
|
{% elif error.value == "UNAUTHORIZED" %}
|
|
|
|
<p>Missing permissions to fetch the remote object.</p>
|
2022-07-26 11:51:20 -05:00
|
|
|
{% elif error.value == "TIMEOUT" %}
|
|
|
|
<p>Lookup timed out, please try refreshing the page.</p>
|
|
|
|
{% else %}
|
|
|
|
<p>Unexpected error, please check the logs and report an issue if needed.</p>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2022-07-09 12:26:18 -05:00
|
|
|
{% if ap_object and ap_object.ap_type in actor_types %}
|
2022-07-27 12:36:55 -05:00
|
|
|
{{ utils.display_actor(ap_object, actors_metadata, with_details=True) }}
|
2022-06-22 13:11:22 -05:00
|
|
|
{% elif ap_object %}
|
2022-07-14 12:05:45 -05:00
|
|
|
{{ utils.display_object(ap_object, actors_metadata=actors_metadata) }}
|
2022-06-22 13:11:22 -05:00
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|