diff --git a/src/lib/components/CollectionView.svelte b/src/lib/components/CollectionView.svelte new file mode 100644 index 0000000..e0907d8 --- /dev/null +++ b/src/lib/components/CollectionView.svelte @@ -0,0 +1,232 @@ + + + +
{subtitle}
+ {/if} + {#if metadata} + + {/if} +| # | +Title | + {#if showAlbumColumn} +Artist | +Album | + {/if} +Duration | +Format | +
|---|---|---|---|---|---|
| + {track.metadata.trackNumber ?? i + 1} + | +{track.metadata.title || track.filename} | + {#if showAlbumColumn} +{track.metadata.artist || '—'} | +{track.metadata.album || '—'} | + {/if} ++ {#if track.metadata.duration} + {Math.floor(track.metadata.duration / 60)}:{String(Math.floor(track.metadata.duration % 60)).padStart(2, '0')} + {:else} + — + {/if} + | +{track.format.toUpperCase()} | +
Loading album...
{:else if error}{error}
{:else} - -{artistName}
- -| # | -Title | -Duration | -Format | -
|---|---|---|---|
| - {track.metadata.trackNumber ?? i + 1} - | -{track.metadata.title || track.filename} | -- {#if track.metadata.duration} - {Math.floor(track.metadata.duration / 60)}:{String(Math.floor(track.metadata.duration % 60)).padStart(2, '0')} - {:else} - — - {/if} - | -{track.format.toUpperCase()} | -