Add section images, larger covers and track tags
All checks were successful
Deploy Palico Bot / check (push) Successful in 10s
Deploy Palico Bot / deploy (push) Successful in 6s

Section images:
- A section gets an optional image, set from its new "Modifier" dialog
  (name and image), which replaces "Renommer". It goes through the same
  conversion as track covers and is deleted with its section.
- Track and section uploads share routes/coverUpload.js. The cover
  folder is created again if it went missing, instead of failing.

Larger images: 72 px for tracks (was 48), 96 px for section headers,
160 px in the player and the edit dialog (was 96); smaller on phones.

Tags:
- Library tracks take free tags, edited in the "Modifier" dialog, which
  suggests the tags already in use. Case is ignored ("Épique" and
  "épique" are one tag); at most 15 tags of 30 characters.
- A tag bar above the library filters it, and the "Tout ajouter"
  buttons (global and per section) then only queue its tracks
  (enqueue-all takes a tag). The search also matches tags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-12-01 23:11:05 +01:00
parent 793765fb79
commit bda95ca946
13 changed files with 601 additions and 165 deletions

View file

@ -169,7 +169,7 @@
<h2 id="libraryTitle">Bibliothèque permanente</h2>
<p class="panel__subtitle">
Les fichiers conservés sont listés ici. Range-les en sections,
donne-leur une pochette, ajoute-les à la file.
donne-leur une image, ajoute-les à la file.
</p>
</div>
<div class="toolbar">
@ -184,38 +184,48 @@
<input
type="search"
id="librarySearch"
placeholder="Rechercher un morceau…"
placeholder="Rechercher un morceau ou une étiquette…"
autocomplete="off"
/>
<div id="libraryTags" class="tag-list tag-list--filter" role="group" aria-label="Filtrer par étiquette" hidden></div>
<div id="libraryList" class="library"></div>
<p id="libraryEmpty" class="text--muted">Aucun fichier permanent enregistré.</p>
</section>
<dialog id="trackDialog" class="dialog" aria-labelledby="trackDialogTitle">
<form id="trackForm">
<h2 id="trackDialogTitle">Modifier le morceau</h2>
<dialog id="editDialog" class="dialog" aria-labelledby="editDialogTitle">
<form id="editForm">
<h2 id="editDialogTitle">Modifier le morceau</h2>
<div class="track-editor">
<div id="trackCoverPreview" class="cover cover--large cover--empty" aria-hidden="true"></div>
<div class="track-editor__cover-fields">
<label for="trackCoverInput">Pochette</label>
<input type="file" id="trackCoverInput" accept="image/png,image/jpeg,image/webp,image/gif" />
<p class="hint">PNG, JPEG, WebP ou GIF, 10 Mo au plus. Recadrée à 512 px.</p>
<button id="trackCoverRemoveBtn" class="btn btn--ghost btn--small u-mt-1" type="button">
<div class="cover-editor">
<div id="editCoverPreview" class="cover cover--large cover--empty" aria-hidden="true"></div>
<div class="cover-editor__fields">
<label id="editCoverLabel" for="editCoverInput">Pochette</label>
<input type="file" id="editCoverInput" accept="image/png,image/jpeg,image/webp,image/gif" />
<p class="hint">PNG, JPEG, WebP ou GIF, 10 Mo au plus. Réduite à 512 px.</p>
<button id="editCoverRemoveBtn" class="btn btn--ghost btn--small u-mt-1" type="button">
Retirer la pochette
</button>
</div>
</div>
<label for="trackTitleInput" class="u-mt-1">Titre</label>
<input type="text" id="trackTitleInput" maxlength="200" required />
<label id="editNameLabel" for="editNameInput" class="u-mt-1">Titre</label>
<input type="text" id="editNameInput" maxlength="200" required />
<label for="trackSectionSelect" class="u-mt-1">Section</label>
<select id="trackSectionSelect"></select>
<div id="editSectionField">
<label for="editSectionSelect" class="u-mt-1">Section</label>
<select id="editSectionSelect"></select>
</div>
<div id="editTagsField">
<label for="editTagsInput" class="u-mt-1">Étiquettes</label>
<input type="text" id="editTagsInput" maxlength="500" autocomplete="off" placeholder="épique, calme, combat…" />
<p class="hint">Sépare-les par des virgules. Clique sur une étiquette existante pour l'ajouter.</p>
<div id="editTagSuggestions" class="tag-list"></div>
</div>
<div class="form-actions toolbar">
<button id="trackCancelBtn" class="btn btn--ghost" type="button">Annuler</button>
<button id="trackSaveBtn" class="btn" type="submit">Enregistrer</button>
<button id="editCancelBtn" class="btn btn--ghost" type="button">Annuler</button>
<button id="editSaveBtn" class="btn" type="submit">Enregistrer</button>
</div>
</form>
</dialog>