2018-07-20 17:15:47 -05:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
{% import 'utils.html' as utils %}
|
|
|
|
{% block title %}Lookup - {{ config.NAME }}{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<div id="container">
|
|
|
|
<div style="margin-top:50px;">
|
|
|
|
|
2019-10-16 16:19:45 -05:00
|
|
|
<p>Interact with an ActivityPub object via its URL or look for a user using <i>@user@domain.tld</i></p>
|
|
|
|
|
2019-08-15 10:09:17 -05:00
|
|
|
<form id="lookup-form" method="GET">
|
2019-10-16 16:19:45 -05:00
|
|
|
<input type="text" name="url" value="{{url or '' }}">
|
2019-08-15 10:09:17 -05:00
|
|
|
<input type="submit" value="Lookup">
|
2018-07-20 17:15:47 -05:00
|
|
|
</form>
|
|
|
|
|
|
|
|
{% if data %}
|
|
|
|
{% set data = data.to_dict() %}
|
|
|
|
<div id="lookup-result" style="margin-top:30px;">
|
2018-07-29 13:24:46 -05:00
|
|
|
{% if data | has_actor_type %}
|
2019-07-05 15:05:28 -05:00
|
|
|
<div style="margin-left:95px;padding-bottom:5px;margin-bottom:15px;display:inline-block;">
|
2019-10-22 13:32:12 -05:00
|
|
|
{% if following %}
|
|
|
|
<form action="/api/undo" class="action-form" method="post">
|
|
|
|
<input type="hidden" name="redirect" value="{{ request.path }}?url={{request.args.get('url')}}"/>
|
|
|
|
<input type="hidden" name="id" value="{{ following.remote_id }}"/>
|
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
|
|
<button type="submit" class="bar-item">unfollow</button>
|
|
|
|
</form>
|
|
|
|
<form action="/api/block" class="action-form" method="POST">
|
|
|
|
<input type="hidden" name="redirect" value="{{ request.path }}?url={{request.args.get('url')}}"/>
|
|
|
|
<input type="hidden" name="actor" value="{{ data.id }}">
|
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
|
|
<button type="submit" class="bar-item" onclick="return confirm('Confirm the block action?');">block</button>
|
|
|
|
</form>
|
|
|
|
{% else %}
|
2019-08-27 16:02:19 -05:00
|
|
|
<a class="bar-item" href="/admin/profile?actor_id={{data.id}}">profile</a>
|
2018-07-20 17:15:47 -05:00
|
|
|
<form action="/api/follow" class="action-form" method="POST">
|
|
|
|
<input type="hidden" name="redirect" value="{{ request.path }}"/>
|
|
|
|
<input type="hidden" name="actor" value="{{ data.id }}"/>
|
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
|
|
<button type="submit" class="bar-item">follow</button>
|
|
|
|
</form>
|
2019-10-22 13:32:12 -05:00
|
|
|
{% endif %}
|
|
|
|
{% if follower %}<span class="bar-item-no-hover">follows you!</span>{% endif %}
|
2018-07-20 17:15:47 -05:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{{ utils.display_actor_inline(data, size=80) }}
|
2019-08-27 16:02:19 -05:00
|
|
|
|
2018-07-20 17:15:47 -05:00
|
|
|
{% elif data | has_type('Create') %}
|
2019-10-15 17:01:38 -05:00
|
|
|
{{ utils.display_note(data.object, meta=meta) }}
|
2019-06-29 04:33:29 -05:00
|
|
|
{% elif data | has_type(['Note', 'Article', 'Video', 'Audio', 'Page', 'Question']) %}
|
2019-10-15 17:01:38 -05:00
|
|
|
{{ utils.display_note(data, meta=meta) }}
|
2018-07-29 13:10:15 -05:00
|
|
|
{% elif data | has_type('Announce') %}
|
|
|
|
{% set boost_actor = meta.actor %}
|
|
|
|
<p style="margin-left:65px;padding-bottom:5px;">
|
|
|
|
<span class="bar-item-no-hover"><a style="color:#808080;" href="{{ boost_actor.url | get_url }}">{{ boost_actor.name }}</a> boosted</span>
|
|
|
|
</p>
|
2019-10-15 17:01:38 -05:00
|
|
|
{{ utils.display_note(meta.object, meta=meta) }}
|
2018-07-29 13:10:15 -05:00
|
|
|
|
2018-07-20 17:15:47 -05:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|