More UI tweaks/bugfixes

This commit is contained in:
Thomas Sileo 2019-10-20 16:00:02 +02:00
parent ae12ade432
commit e265704e03
5 changed files with 19 additions and 5 deletions

View file

@ -336,6 +336,12 @@ def admin_new() -> _Response:
)
@blueprint.route("/admin/direct_messages", methods=["GET"])
@login_required
def admin_direct_messages() -> _Response:
return htmlify(render_template("direct_messages.html"))
@blueprint.route("/admin/lists", methods=["GET"])
@login_required
def admin_lists() -> _Response:

View file

@ -39,6 +39,8 @@ dt, dd { font-size: 0.9em; }
{% if unread_notifications_count %}
({{unread_notifications_count}})
{% endif %}</a></li>
<!-- <li class="left"><a href="/admin/direct_messages"{% if request.path == url_for('admin.admin_direct_messages') %} class="selected" {% endif %}>DMs</a></li>
-->
<li class="left"><a href="/admin/lists"{% if request.path == url_for('admin.admin_lists') %} class="selected" {% endif %}>Lists</a></li>
<li class="left"><a href="/admin/bookmarks"{% if request.path == "/admin/bookmarks" %} class="selected" {% endif %}>Bookmarks</a></li>
<li class="left"><a href="/admin/lookup"{% if request.path == "/admin/lookup" %} class="selected" {% endif %}>Lookup</a></li>

View file

@ -19,7 +19,7 @@
{% endif %}
</div>
{% endif %}
<form action="/api/new_{% if request.args.get("question") == "1" %}question{%else%}note{%endif%}" method="POST" enctype="multipart/form-data">
<form id="new-activity" action="/api/new_{% if request.args.get("question") == "1" %}question{%else%}note{%endif%}" method="POST" enctype="multipart/form-data">
<input type="hidden" name="redirect" value="/">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<select name="visibility" style="padding:8px 10px;">

View file

@ -126,18 +126,18 @@
{% for item in inbox_data %}
{% if 'actor' in item.meta %}
{% if item | has_type('Create') %}
{% if request.path.startswith("/admin/notifications") and not item.meta.reply_acked and item.meta.object_visibility | visibility_is_public %}
<div style="margin-left:70px;padding-bottom:5px;margin-bottom:15px;display:inline-block;">
{% if request.path.startswith("/admin/notifications") and not item.meta.reply_acked and item.meta.object_visibility | visibility_is_public %}
<form action="/api/ack_reply" class="action-form" method="POST">
<input type="hidden" name="redirect" value="{{ request.path }}"/>
<input type="hidden" name="reply_iri" value="{{ item.meta.object_id }}"/>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<button type="submit" class="bar-item">ack reply</button>
</form>
{{ utils.display_in_reply_to(item.meta, item.activity.object) }}
</div>
{% endif %}
{{ utils.display_in_reply_to(item.meta, item.activity.object) }}
</div>
{{ utils.display_note(item.activity.object, meta=item.meta) }}
{% else %}
{% if item | has_type('Announce') %}

View file

@ -59,7 +59,7 @@
{% if meta.in_reply_to_actor %}
{{ display_actor_box(meta.in_reply_to_actor, before="in reply to", before_url=obj.inReplyTo) }}
{% elif meta.in_reply_to_self %}
<span class="bar-item-no-hover" style="padding:0;">
<span class="bar-item-no-hover">
<a href="{{ obj.inReplyTo }}">self reply</a>
</span>
{% endif %}
@ -414,8 +414,14 @@
{% macro display_thread(thread, likes=[], shares=[]) -%}
{% for reply in thread %}
{% if reply._requested %}
<div style="margin-left:70px;padding-bottom:5px;margin-bottom:15px;display:inline-block;">
{{ display_in_reply_to(reply.meta, reply.activity.object) }}
</div>
{{ display_note(reply.activity.object, perma=True, likes=likes, shares=shares, meta=reply.meta) }}
{% else %}
<div style="margin-left:70px;padding-bottom:5px;margin-bottom:15px;display:inline-block;">
{{ display_in_reply_to(reply.meta, reply.activity.object) }}
</div>
{{ display_note(reply.activity.object, perma=False, meta=reply.meta) }}
{% endif %}
{% endfor %}