Add a "needs review" flag with a sidebar filter
Links can be bookmarked for a later look via a toggle button on the card (🏷️/🔖), shown with a yellow border while flagged. A new sidebar section "Merkliste" links to /?review=1, filtering to just the flagged links; the count updates live via the existing facets query. Since the project has no migration framework, add a minimal startup check that ALTER TABLEs in the needs_review column for existing SQLite databases (create_all only creates missing tables). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<div class="panel link-card" id="link-{{ link.id }}">
|
||||
<div class="panel link-card {% if link.needs_review %}needs-review{% endif %}" id="link-{{ link.id }}">
|
||||
<div class="card-head">
|
||||
<span class="card-avatar" style="--h: {{ link.url | hue }};">
|
||||
{{ (link.url | domain)[:1] | upper or '?' }}
|
||||
@@ -14,6 +14,12 @@
|
||||
</div>
|
||||
|
||||
<div class="card-actions">
|
||||
<button class="ghost review-toggle {% if link.needs_review %}active{% endif %}"
|
||||
style="padding:3px 7px; font-size:.8rem;"
|
||||
title="{% if link.needs_review %}Nicht mehr zur Durchsicht{% else %}Zur Durchsicht markieren{% endif %}"
|
||||
hx-post="/links/{{ link.id }}/toggle-review"
|
||||
hx-target="#link-{{ link.id }}"
|
||||
hx-swap="outerHTML">{% if link.needs_review %}🔖{% else %}🏷️{% endif %}</button>
|
||||
<button class="ghost" style="padding:3px 7px; font-size:.8rem;"
|
||||
title="Bearbeiten"
|
||||
hx-get="/links/{{ link.id }}/edit"
|
||||
|
||||
Reference in New Issue
Block a user