Added admin dashboard, refactored user dashboard. Removed old reviews route.
CI - Build Tonehaus Docker image / tonehaus-ci-build (push) Successful in 1m53s

This commit is contained in:
boris committed 2025-11-20 20:40:49 +00:00
1 parent cd04fa5212
commit f15d9a9cfd
16 files changed
+534 -75

No files matched your search

+11 -2
View File
@@ -14,6 +14,13 @@
</div>
<div class="collapse col-12" id="advancedSearch">
<div class="row g-2 mt-1">
<div class="col-sm-3 order-sm-4">
<select class="form-select" name="source">
<option value="all" {{ (source is defined and source == 'all') or source is not defined ? 'selected' : '' }}>All sources</option>
<option value="spotify" {{ (source is defined and source == 'spotify') ? 'selected' : '' }}>Spotify</option>
<option value="user" {{ (source is defined and source == 'user') ? 'selected' : '' }}>User-created</option>
</select>
</div>
<div class="col-sm-4">
<input class="form-control" type="text" name="album" value="{{ album }}" placeholder="Album title" />
</div>
@@ -52,12 +59,14 @@
{% set s = stats[album.id] ?? { 'avg': 0, 'count': 0 } %}
<p class="card-text"><small class="text-secondary">User score: {{ s.avg }}/10 ({{ s.count }})</small></p>
<div class="mt-auto">
<a class="btn btn-outline-success btn-sm" href="{{ album.external_urls.spotify }}" target="_blank" rel="noopener">Open in Spotify</a>
{% if album.external_urls.spotify is defined and album.external_urls.spotify %}
<a class="btn btn-outline-success btn-sm" href="{{ album.external_urls.spotify }}" target="_blank" rel="noopener">Open in Spotify</a>
{% endif %}
<a class="btn btn-success btn-sm" href="{{ path('album_show', {id: album.id}) }}">Reviews</a>
{% if album.source is defined and album.source == 'user' %}
<span class="badge text-bg-primary ms-2">User album</span>
{% endif %}
{% if app.user %}
{% if app.user and (album.source is not defined or album.source != 'user') %}
{% if savedIds is defined and (album.id in savedIds) %}
<span class="badge text-bg-secondary ms-2">Saved</span>
{% else %}