what the fuck
All checks were successful
CI - Build Tonehaus Docker image / tonehaus-ci-build (push) Successful in 1m55s

This commit is contained in:
2025-11-27 20:03:12 +00:00
parent f15d9a9cfd
commit 054e970df9
36 changed files with 1434 additions and 363 deletions

View File

@@ -37,9 +37,15 @@
<h2 class="h6 mb-3">Latest reviews (50)</h2>
<div class="vstack gap-2">
{% for r in recentReviews %}
<div>
<div><a class="text-decoration-none" href="{{ path('review_show', {id: r.id}) }}">{{ r.title }}</a> <span class="text-secondary">(Rating {{ r.rating }}/10)</span></div>
<div class="text-secondary small">{{ r.album.name }} • by {{ r.author.displayName ?? r.author.userIdentifier }}{{ r.createdAt|date('Y-m-d H:i') }}</div>
<div class="d-flex justify-content-between align-items-start">
<div class="me-2">
<div><a class="text-decoration-none" href="{{ path('review_show', {id: r.id}) }}">{{ r.title }}</a> <span class="text-secondary">(Rating {{ r.rating }}/10)</span></div>
<div class="text-secondary small">{{ r.album.name }} • by {{ r.author.displayName ?? r.author.userIdentifier }}{{ r.createdAt|date('Y-m-d H:i') }}</div>
</div>
<form method="post" action="{{ path('review_delete', {id: r.id}) }}" onsubmit="return confirm('Delete this review?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete_review_' ~ r.id) }}" />
<button class="btn btn-sm btn-outline-danger" type="submit">Delete</button>
</form>
</div>
{% else %}
<div class="text-secondary">No reviews.</div>
@@ -55,8 +61,8 @@
<div class="vstack gap-2">
{% for a in recentAlbums %}
{% set publicId = a.source == 'user' ? a.localId : a.spotifyId %}
<div class="d-flex justify-content-between">
<div>
<div class="d-flex justify-content-between align-items-start">
<div class="me-2">
<div>
{% if publicId %}
<a class="text-decoration-none" href="{{ path('album_show', {id: publicId}) }}">{{ a.name }}</a>
@@ -67,6 +73,12 @@
</div>
<div class="text-secondary small">{{ a.artists|join(', ') }}{% if a.releaseDate %}{{ a.releaseDate }}{% endif %}{{ a.createdAt|date('Y-m-d H:i') }}</div>
</div>
{% if publicId %}
<form method="post" action="{{ path('album_delete', {id: publicId}) }}" onsubmit="return confirm('Delete this album?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete-album-' ~ publicId) }}" />
<button class="btn btn-sm btn-outline-danger" type="submit">Delete</button>
</form>
{% endif %}
</div>
{% else %}
<div class="text-secondary">No albums.</div>