diff options
Diffstat (limited to 'templates/activities')
-rw-r--r-- | templates/activities/_post.html | 23 | ||||
-rw-r--r-- | templates/activities/compose.html | 3 |
2 files changed, 18 insertions, 8 deletions
diff --git a/templates/activities/_post.html b/templates/activities/_post.html index ebe5696..e294698 100644 --- a/templates/activities/_post.html +++ b/templates/activities/_post.html @@ -18,13 +18,11 @@ {% elif post.visibility == 4 %} <i class="visibility fa-solid fa-link-slash" title="Local Only"></i> {% endif %} - <a href="{{ post.url }}"> - {% if post.published %} - {{ post.published | timedeltashort }} - {% else %} - {{ post.created | timedeltashort }} - {% endif %} - </a> + {% if post.published %} + <a href="{{ post.url }}" title="{{ post.published }}">{{ post.published | timedeltashort }}</a> + {% else %} + <a href="{{ post.url }}" title="{{ post.created }}">{{ post.created | timedeltashort }}</a> + {% endif %} </time> {% if request.identity %} @@ -32,14 +30,19 @@ {% include "activities/_reply.html" %} {% include "activities/_like.html" %} {% include "activities/_boost.html" %} + {% if post.author == request.identity %} <a title="Menu" class="menu" _="on click toggle .enabled on the next <menu/>"> <i class="fa-solid fa-caret-down"></i> </a> <menu> + <a href="{{ post.urls.action_edit }}"> + <i class="fa-solid fa-pen-to-square"></i> Edit + </a> <a href="{{ post.urls.action_delete }}"> <i class="fa-solid fa-trash"></i> Delete </a> </menu> + {% endif %} </div> {% endif %} @@ -57,6 +60,12 @@ {{ post.safe_content_local }} </div> + {% if post.edited %} + <div class="edited" title="{{ post.edited }}"> + <small>Edited {{ post.edited | timedeltashort }} ago</small> + </div> + {% endif %} + {% if post.attachments.exists %} <div class="attachments"> {% for attachment in post.attachments.all %} diff --git a/templates/activities/compose.html b/templates/activities/compose.html index 1a02227..e705f97 100644 --- a/templates/activities/compose.html +++ b/templates/activities/compose.html @@ -12,12 +12,13 @@ {% include "activities/_mini_post.html" with post=reply_to %} {% endif %} {{ form.reply_to }} + {{ form.id }} {% include "forms/_field.html" with field=form.text %} {% include "forms/_field.html" with field=form.content_warning %} {% include "forms/_field.html" with field=form.visibility %} </fieldset> <div class="buttons"> - <button>{% if config_identity.toot_mode %}Toot!{% else %}Post{% endif %}</button> + <button>{% if form.id %}Edit{% elif config_identity.toot_mode %}Toot!{% else %}Post{% endif %}</button> </div> </form> {% endblock %} |