2022-07-07 08:02:13 +00:00
|
|
|
<div class="nav">
|
|
|
|
<div class="flex-container">
|
2022-08-11 07:28:37 +00:00
|
|
|
<a href="/posts/download_latest" title="Download latest posts">
|
|
|
|
<img src="/icons/download.png">
|
|
|
|
</a>
|
2022-07-07 08:02:13 +00:00
|
|
|
{% if post_is_selected %}
|
2022-08-11 16:19:50 +00:00
|
|
|
{% if post.read %}
|
|
|
|
{% set mark_unread_url = "/posts/" ~ selected_peer_encoded ~ "/" ~ selected_post_encoded ~ "/unread" %}
|
|
|
|
<a class="disabled icon" title="Mark as read">
|
|
|
|
<img src="/icons/read_post.png">
|
|
|
|
</a>
|
|
|
|
<a href={{ mark_unread_url }} class="icon" title="Mark as unread">
|
|
|
|
<img src="/icons/unread_post.png">
|
|
|
|
</a>
|
|
|
|
{% else %}
|
|
|
|
{% set mark_read_url = "/posts/" ~ selected_peer_encoded ~ "/" ~ selected_post_encoded ~ "/read" %}
|
|
|
|
<a href={{ mark_read_url }} class="icon" title="Mark as read">
|
|
|
|
<img src="/icons/read_post.png">
|
|
|
|
</a>
|
|
|
|
<a class="disabled icon" title="Mark as unread">
|
|
|
|
<img src="/icons/unread_post.png">
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% set delete_post_url = "/posts/" ~ selected_peer_encoded ~ "/" ~ selected_post_encoded ~ "/delete" %}
|
|
|
|
<a href={{ delete_post_url }} class="icon" title="Delete post">
|
|
|
|
<img src="/icons/delete_post.png">
|
|
|
|
</a>
|
2022-08-11 07:28:37 +00:00
|
|
|
{% else %}
|
2022-08-11 16:19:50 +00:00
|
|
|
<a class="disabled icon" title="Mark as read">
|
|
|
|
<img src="/icons/read_post.png">
|
|
|
|
</a>
|
|
|
|
<a class="disabled icon" title="Mark as unread">
|
|
|
|
<img src="/icons/unread_post.png">
|
|
|
|
</a>
|
|
|
|
<a class="disabled icon" title="Delete post">
|
|
|
|
<img src="/icons/delete_post.png">
|
|
|
|
</a>
|
2022-07-07 08:02:13 +00:00
|
|
|
{% endif %}
|
2022-08-11 07:28:37 +00:00
|
|
|
<form class="flex-container" action="/subscribe" method="post">
|
2022-07-07 08:02:13 +00:00
|
|
|
<label for="public_key">Public Key</label>
|
2022-08-11 07:59:17 +00:00
|
|
|
{% if selected_peer %}
|
2022-08-11 16:19:50 +00:00
|
|
|
<input type="text" id="public_key" name="public_key" maxlength=53 value={{ selected_peer }}>
|
2022-08-11 07:59:17 +00:00
|
|
|
{% else %}
|
2022-08-11 16:19:50 +00:00
|
|
|
<input type="text" id="public_key" name="public_key" maxlength=53>
|
2022-08-11 07:59:17 +00:00
|
|
|
{% endif %}
|
2022-07-07 08:02:13 +00:00
|
|
|
<input type="submit" value="Subscribe">
|
|
|
|
<input type="submit" value="Unsubscribe" formaction="/unsubscribe">
|
|
|
|
</form>
|
2022-08-17 12:38:08 +00:00
|
|
|
{% if flash and flash.kind == "error" %}
|
|
|
|
<p class="flash-message">[ {{ flash.message }} ]</p>
|
|
|
|
{% endif %}
|
2022-07-07 08:02:13 +00:00
|
|
|
</div>
|
|
|
|
</div>
|