add ability to bookmark posts and threads, courtesy of bitty

This commit is contained in:
2025-11-23 22:07:50 +03:00
parent 962b833a80
commit 075a9bd498
15 changed files with 521 additions and 31 deletions

View File

@@ -1,9 +1,10 @@
{% from "common/macros.html" import accordion, full_post %}
{% from "common/macros.html" import accordion, full_post, bookmark_button %}
{% from "common/icons.html" import icn_bookmark %}
{% extends "base.html" %}
{% block title %}bookmarks{% endblock %}
{% block content %}
<div class="darkbg inbox-container">
<a class="linkbutton" href="{{ url_for('users.bookmark_collections', username=get_active_user().username) }}">Manage collections</a>
{% for collection in collections | sort(attribute='sort_order') %}
{% call(section) accordion(disabled=collection.is_empty()) %}
{% if section == 'header' %}
@@ -28,7 +29,7 @@
<i>{{ thread.note }}</i>
</td>
<td>
<button type="button" class="contain-svg inline icon">{{ icn_bookmark(20) }}Manage&hellip;</button>
{{ bookmark_button(type='thread', id=thread.thread_id, message='Manage&hellip;', require_reload=true) }}
</td>
</tr>
{% endfor %}
@@ -40,7 +41,7 @@
Posts{{" (no bookmarks)" if not collection.has_posts() else ""}}
{% else %}
{% for post in collection.get_posts() %}
{{ full_post(post.get_post().get_full_post_view(), no_reply=false, render_sig=false, show_thread_title=true, show_bookmark=true, memo=post.note, bookmark_message="Manage&hellip;") }}
{{ full_post(post.get_post().get_full_post_view(), no_reply=false, render_sig=false, show_thread_title=true, show_bookmark=true, memo=post.note, bookmark_message="Manage&hellip;", reload_after_bookmark=true) }}
{% endfor %}
{% endif %}
{% endcall %}