Admin fixes and design tweaks

main
Thomas Sileo 2022-07-03 22:42:14 +02:00
parent 45dc57b538
commit fbaf40a6ac
6 changed files with 46 additions and 7 deletions

View File

@ -282,7 +282,9 @@ async def admin_outbox(
(
await db_session.scalars(
q.options(
joinedload(models.OutboxObject.relates_to_inbox_object),
joinedload(models.OutboxObject.relates_to_inbox_object).options(
joinedload(models.InboxObject.actor),
),
joinedload(models.OutboxObject.relates_to_outbox_object),
joinedload(models.OutboxObject.relates_to_actor),
joinedload(models.OutboxObject.outbox_object_attachments).options(

View File

@ -167,7 +167,15 @@ async def index(
q.options(
joinedload(models.OutboxObject.outbox_object_attachments).options(
joinedload(models.OutboxObjectAttachment.upload)
)
),
joinedload(models.OutboxObject.relates_to_inbox_object).options(
joinedload(models.InboxObject.actor),
),
joinedload(models.OutboxObject.relates_to_outbox_object).options(
joinedload(models.OutboxObject.outbox_object_attachments).options(
joinedload(models.OutboxObjectAttachment.upload)
),
),
)
.order_by(models.OutboxObject.ap_published_at.desc())
.offset(page_offset)

View File

@ -26,6 +26,12 @@ body {
a {
text-decoration: none;
}
.shared-header {
margin-left:60px;margin-top:30px;margin-bottom:-15px;
strong {
color: $primary-color;
}
}
.activity-main {
a {
@ -36,7 +42,7 @@ a {
}
code, pre {
color: $secondary-color; // #cb4b16; // #268bd2; // #2aa198;
font-family: 'Inconsolata, monospace';
font-family: monospace;
}
.form {
input, select, textarea {
@ -118,6 +124,7 @@ footer {
}
}
nav {
input[type=submit], button {
font-size: 20px;
line-height: 32px;
@ -131,6 +138,7 @@ input[type=submit], button {
color: $secondary-color;
}
}
}
nav.flexbox {
ul {
@ -184,7 +192,15 @@ nav.flexbox {
.actor-handle {
color: $muted-color;
}
.activity-date { float:right; }
.activity-date {
float:right;
a {
color: $muted-color;
&:hover {
color: $secondary-color;
}
}
}
.object-visibility { float:right;color: $muted-color;margin-right:10px; }
}
}
@ -199,6 +215,13 @@ nav.flexbox {
.activity-bar {
margin-left: 60px;
margin-top: 10px;
color: $muted-color;
a {
color: $muted-color;
&:hover {
color: $secondary-color;
}
}
}
}
.actor-action {

View File

@ -19,7 +19,12 @@
<div class="h-feed">
<data class="p-name" value="{{ local_actor.display_name}}'s notes"></data>
{% for outbox_object in objects %}
{% if outbox_object.ap_type in ["Note", "Article", "Video"] %}
{{ utils.display_object(outbox_object) }}
{% elif outbox_object.ap_type == "Announce" %}
<div class="shared-header"><strong>{{ local_actor.display_name }}</strong> shared</div>
{{ utils.display_object(outbox_object.relates_to_anybox_object) }}
{% endif %}
{% endfor %}
</div>

View File

@ -3,9 +3,9 @@
{% block content %}
<div style="display:grid;height:80%;">
<div style="margin:auto;">
<form action="/admin/login" method="POST">
<form class="form" action="/admin/login" method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
<input type="password" name="password">
<input type="password" placeholder="password" name="password">
<input type="submit" value="Login">
</form>
</div>

View File

@ -320,6 +320,7 @@
<nav class="flexbox activity-bar">
<ul>
{% if not is_admin or object.is_from_outbox %}<li><div><a href="{{ object.url }}"{% if object.is_from_inbox %} rel="nofollow"{% endif %}>permalink</a></div></li>{% endif %}
{% if object.is_from_outbox %}
<li>
<div class="comment-count">{{ object.likes_count }} like{{ object.likes_count | pluralize }}</div>
@ -350,7 +351,7 @@
{% endif %}
{% endif %}
{% if object.is_from_inbox %}
{% if object.is_from_inbox and is_admin %}
<li>
{% if object.liked_via_outbox_object_ap_id %}
{{ admin_undo_button(object.liked_via_outbox_object_ap_id, "unlike") }}