Release: web UX overhaul + Android native port + server polish #59
+35
-17
@@ -60,6 +60,41 @@ fun PlaylistCard(
|
|||||||
color = Color.Transparent,
|
color = Color.Transparent,
|
||||||
) {
|
) {
|
||||||
Column(modifier = Modifier.padding(horizontal = 8.dp)) {
|
Column(modifier = Modifier.padding(horizontal = 8.dp)) {
|
||||||
|
PlaylistCardCover(
|
||||||
|
playlist = playlist,
|
||||||
|
onPlay = onPlay,
|
||||||
|
playEnabled = playEnabled,
|
||||||
|
)
|
||||||
|
Spacer(Modifier.height(8.dp))
|
||||||
|
Text(
|
||||||
|
text = playlist.name,
|
||||||
|
style = MaterialTheme.typography.titleSmall,
|
||||||
|
color = MaterialTheme.colorScheme.onSurface,
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = TextOverflow.Ellipsis,
|
||||||
|
)
|
||||||
|
Text(
|
||||||
|
text = subtitleFor(playlist),
|
||||||
|
style = MaterialTheme.typography.bodySmall,
|
||||||
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = TextOverflow.Ellipsis,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 144dp cover with the system-variant pill (top-start) and play
|
||||||
|
* overlay (bottom-end) stacked on top. Pulled out of [PlaylistCard]
|
||||||
|
* to keep that composable under detekt's 60-line LongMethod cap.
|
||||||
|
*/
|
||||||
|
@Composable
|
||||||
|
private fun PlaylistCardCover(
|
||||||
|
playlist: PlaylistRef,
|
||||||
|
onPlay: (suspend () -> Unit)?,
|
||||||
|
playEnabled: Boolean,
|
||||||
|
) {
|
||||||
CoverTile(
|
CoverTile(
|
||||||
url = playlist.coverUrl,
|
url = playlist.coverUrl,
|
||||||
contentDescription = playlist.name,
|
contentDescription = playlist.name,
|
||||||
@@ -92,23 +127,6 @@ fun PlaylistCard(
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
Spacer(Modifier.height(8.dp))
|
|
||||||
Text(
|
|
||||||
text = playlist.name,
|
|
||||||
style = MaterialTheme.typography.titleSmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurface,
|
|
||||||
maxLines = 1,
|
|
||||||
overflow = TextOverflow.Ellipsis,
|
|
||||||
)
|
|
||||||
Text(
|
|
||||||
text = subtitleFor(playlist),
|
|
||||||
style = MaterialTheme.typography.bodySmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
maxLines = 1,
|
|
||||||
overflow = TextOverflow.Ellipsis,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Small label chip overlaid on a system playlist's cover. */
|
/** Small label chip overlaid on a system playlist's cover. */
|
||||||
|
|||||||
Reference in New Issue
Block a user