Fix unending: shelf status, not category
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Unending belongs in STATUS_CHOICES alongside completed/abandoned. Adds an Unending shelf tab and an ∞ button on active game cards. Reverts the incorrect category addition from the previous commit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -252,9 +252,7 @@
|
||||
|
||||
function updateSections() {
|
||||
document.querySelectorAll('.cat-section').forEach(el => el.style.display = 'none');
|
||||
const cat = catSelect.value;
|
||||
const secId = cat === 'unending' ? 'section-games' : 'section-' + cat;
|
||||
const sec = document.getElementById(secId);
|
||||
const sec = document.getElementById('section-' + catSelect.value);
|
||||
if (sec) sec.style.display = 'block';
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,6 @@
|
||||
.badge-games { background: #3b2f6a; color: #a78bfa; }
|
||||
.badge-books { background: #064e3b; color: #34d399; }
|
||||
.badge-films { background: #431407; color: #fb923c; }
|
||||
.badge-unending { background: #0c3a52; color: #38bdf8; }
|
||||
.badge-other { background: #1e293b; color: #94a3b8; }
|
||||
.star { color: #fbbf24; font-size: 0.9rem; margin-left: auto; }
|
||||
|
||||
@@ -184,6 +183,7 @@
|
||||
<a href="?sort={{ sort }}" class="tab {% if shelf == 'active' %}active{% endif %}">Active</a>
|
||||
<a href="?shelf=completed&sort={{ sort }}" class="tab {% if shelf == 'completed' %}active{% endif %}">Completed</a>
|
||||
<a href="?shelf=abandoned&sort={{ sort }}" class="tab {% if shelf == 'abandoned' %}active{% endif %}">Abandoned</a>
|
||||
<a href="?shelf=unending&sort={{ sort }}" class="tab {% if shelf == 'unending' %}active{% endif %}">Unending</a>
|
||||
{% if shelf == 'active' %}
|
||||
<span class="tab-sep"></span>
|
||||
<a href="?sort={{ sort }}" class="tab {% if not category %}active{% endif %}">All</a>
|
||||
@@ -234,10 +234,6 @@
|
||||
{% if item.pages_read is not None %}
|
||||
{{ item.pages_read }} pages{% if item.total_pages %} / {{ item.total_pages }} total{% endif %}
|
||||
{% endif %}
|
||||
{% elif item.category == 'unending' %}
|
||||
{% if item.hours_played is not None %}
|
||||
{{ item.hours_played|floatformat:1 }}h played
|
||||
{% endif %}
|
||||
{% elif item.category == 'films' %}
|
||||
{% if item.watched %}✓ Watched{% else %}○ Not watched{% endif %}{% if item.duration_minutes %} · {{ item.duration_minutes }} min{% endif %}
|
||||
{% endif %}
|
||||
@@ -252,6 +248,14 @@
|
||||
<input type="hidden" name="next" value="{{ request.get_full_path }}">
|
||||
<button type="submit" class="btn btn-done">Done</button>
|
||||
</form>
|
||||
{% if item.category == 'games' %}
|
||||
<form method="post" action="{% url 'backlogger:set_status' item.pk %}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="status" value="unending">
|
||||
<input type="hidden" name="next" value="{{ request.get_full_path }}">
|
||||
<button type="submit" class="btn btn-sm btn-outline" style="color:#38bdf8;border-color:#38bdf8" title="Unending">∞</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
<form method="post" action="{% url 'backlogger:set_status' item.pk %}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="status" value="abandoned">
|
||||
|
||||
Reference in New Issue
Block a user