From d430ad884bfd38bea93389d8be730ff00388a7be Mon Sep 17 00:00:00 2001 From: Caleb Allen Date: Wed, 18 Mar 2026 13:40:11 -0400 Subject: [PATCH] fix(18-02): add field labels to all track-details states (single/batch, read/edit) --- .../components/track-details/track-details.ts | 159 ++++++++++-------- 1 file changed, 91 insertions(+), 68 deletions(-) diff --git a/frontend/src/components/track-details/track-details.ts b/frontend/src/components/track-details/track-details.ts index 87caf63..fcba31e 100644 --- a/frontend/src/components/track-details/track-details.ts +++ b/frontend/src/components/track-details/track-details.ts @@ -878,33 +878,36 @@ export class TrackDetails extends LitElement { ${this.batchTracks.length} tracks selected - ${titleField?.mixed - ? html` - ${this.countDistinctValues('title')} different titles - ` - : titleField?.value - ? html` - ${titleField.value} +
+ + ${titleField?.mixed + ? html` + ${this.countDistinctValues('title')} different titles ` - : nothing} - ${artistField?.mixed - ? html` - ${this.countDistinctValues('artist')} different artists - ` - : artistField?.value - ? html` - ${artistField.value} + : html` + ${titleField?.value || 'None'} + `} +
+
+ + ${artistField?.mixed + ? html` + ${this.countDistinctValues('artist')} different artists ` - : nothing} - ${albumField?.mixed - ? html` - ${this.countDistinctValues('album')} different albums - ` - : albumField?.value - ? html` - ${albumField.value} + : html` + ${artistField?.value || 'Unknown Artist'} + `} +
+
+ + ${albumField?.mixed + ? html` + ${this.countDistinctValues('album')} different albums ` - : nothing} + : html` + ${albumField?.value || 'No album'} + `} +
`; } @@ -1235,45 +1238,54 @@ export class TrackDetails extends LitElement { private renderMainFields(t: library.Track) { if (this.editing) { return html` - - this.onEditInput( +
+ + - - this.onEditInput( + @input=${(e: Event) => + this.onEditInput( + 'title', + e, + )} + placeholder="Title" + /> +
+
+ + - - this.onEditInput( + @input=${(e: Event) => + this.onEditInput( + 'artist', + e, + )} + placeholder="Artist" + /> +
+
+ + + @input=${(e: Event) => + this.onEditInput( + 'album', + e, + )} + placeholder="Album" + /> +
${formatMilliseconds(t.TrackLength)} @@ -1281,17 +1293,28 @@ export class TrackDetails extends LitElement { } return html` - - ${t.TrackName || this.fileNameFromPath(t.FilePath)} - - - ${t.ArtistName || 'Unknown Artist'} - - ${t.Album - ? html`${t.Album}` - : nothing} +
+ + + ${t.TrackName || this.fileNameFromPath(t.FilePath)} + +
+
+ + + ${t.ArtistName || 'Unknown Artist'} + +
+
+ + ${t.Album + ? html`${t.Album}` + : html`No album`} +
${formatMilliseconds(t.TrackLength)}