Add unending category for session-based games
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
For games like Dota 2 that have no completion state — shows hours played on the card, reuses the games fields in the form (hours played / total hours), and gets its own cyan badge. No DB column change, only choices metadata update. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -252,7 +252,9 @@
|
||||
|
||||
function updateSections() {
|
||||
document.querySelectorAll('.cat-section').forEach(el => el.style.display = 'none');
|
||||
const sec = document.getElementById('section-' + catSelect.value);
|
||||
const cat = catSelect.value;
|
||||
const secId = cat === 'unending' ? 'section-games' : 'section-' + cat;
|
||||
const sec = document.getElementById(secId);
|
||||
if (sec) sec.style.display = 'block';
|
||||
}
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@
|
||||
.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; }
|
||||
|
||||
@@ -233,6 +234,10 @@
|
||||
{% 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 %}
|
||||
|
||||
Reference in New Issue
Block a user