feat: hide download button for local library tracks
This commit is contained in:
1 parent
16939e02f4
commit
93a6e9545a
2 files changed
+15
-9
No files matched your search
@@ -15,6 +15,7 @@
|
||||
isFavorite?: boolean;
|
||||
downloadStatus?: DownloadStatus;
|
||||
downloadProgress?: number;
|
||||
hideDownload?: boolean;
|
||||
onPlay?: () => void;
|
||||
onDownload?: () => void;
|
||||
onRemoveDownload?: () => void;
|
||||
@@ -43,6 +44,7 @@
|
||||
isFavorite = false,
|
||||
downloadStatus = 'none',
|
||||
downloadProgress = 0,
|
||||
hideDownload = false,
|
||||
onPlay,
|
||||
onDownload,
|
||||
onRemoveDownload,
|
||||
@@ -105,15 +107,17 @@
|
||||
</div>
|
||||
|
||||
<!-- Download Indicator -->
|
||||
<div class="download-indicator" class:has-download={downloadStatus !== 'none'}>
|
||||
<DownloadButton
|
||||
status={downloadStatus}
|
||||
progress={downloadProgress}
|
||||
size={14}
|
||||
onDownload={onDownload}
|
||||
onRemove={onRemoveDownload}
|
||||
/>
|
||||
</div>
|
||||
{#if !hideDownload}
|
||||
<div class="download-indicator" class:has-download={downloadStatus !== 'none'}>
|
||||
<DownloadButton
|
||||
status={downloadStatus}
|
||||
progress={downloadProgress}
|
||||
size={14}
|
||||
onDownload={onDownload}
|
||||
onRemove={onRemoveDownload}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="track-actions">
|
||||
<TrackMenu
|
||||
|
||||
@@ -461,6 +461,7 @@
|
||||
artist={track.artist !== selectedAlbum?.artist ? track.artist : undefined}
|
||||
duration={formatDuration(track.duration_secs)}
|
||||
quality={getQualityBadge(track)}
|
||||
hideDownload={true}
|
||||
onPlay={() => handleTrackPlay(track)}
|
||||
menuActions={{
|
||||
onPlayNow: () => handleTrackPlay(track),
|
||||
@@ -671,6 +672,7 @@
|
||||
artist={track.artist}
|
||||
duration={formatDuration(track.duration_secs)}
|
||||
quality={getQualityBadge(track)}
|
||||
hideDownload={true}
|
||||
onPlay={() => handleTrackPlay(track)}
|
||||
menuActions={{
|
||||
onPlayNow: () => handleTrackPlay(track),
|
||||
|
||||
Reference in new issue
Block a user