Improved audience support and implement featured collection
This commit is contained in:
parent
ff8975acab
commit
4bf54c7040
16 changed files with 284 additions and 37 deletions
|
@ -10,7 +10,14 @@
|
|||
<form action="{{ request.url_for("admin_actions_new") }}" enctype="multipart/form-data" method="POST">
|
||||
{{ utils.embed_csrf_token() }}
|
||||
{{ utils.embed_redirect_url() }}
|
||||
<textarea name="content" rows="10" cols="50" autofocus="autofocus" designMode="on" style="font-size:1.2em;width:95%;"></textarea>
|
||||
<p>
|
||||
<select name="visibility">
|
||||
{% for (k, v) in visibility_enum %}
|
||||
<option value="{{ k }}">{{ v }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</p>
|
||||
<textarea name="content" rows="10" cols="50" autofocus="autofocus" designMode="on" style="font-size:1.2em;width:95%;">{{ content }}</textarea>
|
||||
<input type="hidden" name="in_reply_to" value="{{ request.query_params.in_reply_to }}">
|
||||
<p>
|
||||
<input name="files" type="file" multiple>
|
||||
|
|
|
@ -2,15 +2,34 @@
|
|||
{% extends "layout.html" %}
|
||||
{% block content %}
|
||||
|
||||
<p>Filter by
|
||||
{% for ap_type in ["Note", "Like", "Announce", "Follow"] %}
|
||||
<a style="margin-right:12px;" href="{{ url_for("admin_outbox") }}?filter_by={{ ap_type }}">
|
||||
{% if request.query_params.filter_by == ap_type %}
|
||||
<strong>{{ ap_type }}</strong>
|
||||
{% else %}
|
||||
{{ ap_type }}
|
||||
{% endif %}</a>
|
||||
{% endfor %}.
|
||||
{% if request.query_params.filter_by %}<a href="{{ url_for("admin_outbox") }}">Reset filter</a>{% endif %}</p>
|
||||
</p>
|
||||
|
||||
{% for outbox_object in outbox %}
|
||||
|
||||
{% if outbox_object.ap_type == "Announce" %}
|
||||
<div class="actor-action">You shared</div>
|
||||
{{ utils.display_object(outbox_object.relates_to_anybox_object) }}
|
||||
{% elif outbox_object.ap_type == "Like" %}
|
||||
<div class="actor-action">You liked</div>
|
||||
{{ utils.display_object(outbox_object.relates_to_anybox_object) }}
|
||||
{% elif outbox_object.ap_type == "Follow" %}
|
||||
<div class="actor-action">You followed</div>
|
||||
{{ utils.display_actor(outbox_object.relates_to_actor, actors_metadata) }}
|
||||
{% elif outbox_object.ap_type in ["Article", "Note", "Video"] %}
|
||||
{{ utils.display_object(outbox_object) }}
|
||||
{% else %}
|
||||
Implement {{ outbox_object.ap_type }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
Implement {{ outbox_object.ap_type }}
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
<li>{{ header_link("index", "Notes") }}</li>
|
||||
<li>{{ header_link("followers", "Followers") }} <span>{{ followers_count }}</span></li>
|
||||
<li>{{ header_link("following", "Following") }} <span>{{ following_count }}</span></li>
|
||||
<li>{{ header_link("get_remote_follow", "Remote follow") }}</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
|
|
@ -7,6 +7,12 @@
|
|||
{{ utils.display_object(outbox_object) }}
|
||||
{% endfor %}
|
||||
|
||||
{% if has_previous_page %}
|
||||
<a href="{{ url_for("index") }}?page={{ current_page - 1 }}">Previous</a>
|
||||
{% endif %}
|
||||
|
||||
{% if has_next_page %}
|
||||
<a href="{{ url_for("index") }}?page={{ current_page + 1 }}">Next</a>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
<li>Admin</li>
|
||||
<li>{{ admin_link("index", "Public") }}</li>
|
||||
<li>{{ admin_link("admin_new", "New") }}</li>
|
||||
<li>{{ admin_link("stream", "Stream") }}</li>
|
||||
<li>{{ admin_link("admin_inbox", "Inbox") }}/{{ admin_link("admin_outbox", "Outbox") }}</li>
|
||||
<li>{{ admin_link("get_notifications", "Notifications") }} {% if notifications_count %}({{ notifications_count }}){% endif %}</li>
|
||||
<li>{{ admin_link("get_lookup", "Lookup") }}</li>
|
||||
|
|
|
@ -42,6 +42,24 @@
|
|||
</form>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro admin_pin_button(ap_object_id) %}
|
||||
<form action="{{ request.url_for("admin_actions_pin") }}" method="POST">
|
||||
{{ embed_csrf_token() }}
|
||||
{{ embed_redirect_url() }}
|
||||
<input type="hidden" name="ap_object_id" value="{{ ap_object_id }}">
|
||||
<input type="submit" value="Pin">
|
||||
</form>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro admin_unpin_button(ap_object_id) %}
|
||||
<form action="{{ request.url_for("admin_actions_unpin") }}" method="POST">
|
||||
{{ embed_csrf_token() }}
|
||||
{{ embed_redirect_url() }}
|
||||
<input type="hidden" name="ap_object_id" value="{{ ap_object_id }}">
|
||||
<input type="submit" value="Unpin">
|
||||
</form>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro admin_announce_button(ap_object_id) %}
|
||||
<form action="{{ request.url_for("admin_actions_announce") }}" method="POST">
|
||||
{{ embed_csrf_token() }}
|
||||
|
@ -98,7 +116,7 @@
|
|||
<img src="{{ actor.resized_icon_url }}" style="max-width:45px;">
|
||||
</div>
|
||||
<a href="{{ actor.url }}" style="">
|
||||
<div><strong>{{ actor.name or actor.preferred_username }}</strong></div>
|
||||
<div><strong>{{ actor.display_name | clean_html(actor) | safe }}</strong></div>
|
||||
<div>{{ actor.handle }}</div>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -156,7 +174,7 @@
|
|||
<div class="activity-content">
|
||||
<img src="{{ object.actor.resized_icon_url }}" alt="" class="actor-icon">
|
||||
<div class="activity-header">
|
||||
<strong>{{ object.actor.name or object.actor.preferred_username }}</strong>
|
||||
<strong>{{ object.actor.display_name }}</strong>
|
||||
<span>{{ object.actor.handle }}</span>
|
||||
<span class="activity-date" title="{{ object.ap_published_at.isoformat() }}">
|
||||
{{ object.visibility.value }}
|
||||
|
@ -206,8 +224,14 @@
|
|||
<div class="bar-item">
|
||||
{{ admin_reply_button(object.ap_id) }}
|
||||
</div>
|
||||
<div class="bar-item">
|
||||
{% if object.is_pinned %}
|
||||
{{ admin_unpin_button(object.ap_id) }}
|
||||
{% else %}
|
||||
{{ admin_pin_button(object.ap_id) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if object.is_from_inbox %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue