diff --git a/apps/mobile/app/(app)/(tabs)/home/album/[id].tsx b/apps/mobile/app/(app)/(tabs)/home/album/[id].tsx
index 48159a6..7f6677f 100644
--- a/apps/mobile/app/(app)/(tabs)/home/album/[id].tsx
+++ b/apps/mobile/app/(app)/(tabs)/home/album/[id].tsx
@@ -116,15 +116,30 @@ export default function AlbumScreen() {
{metadata}
) : null}
-
@@ -191,6 +206,15 @@ const styles = StyleSheet.create({
gap: spacing.sm,
marginTop: spacing.sm,
},
+ playButton: { borderRadius: 999, minWidth: 160 },
+ sideActionButton: { borderRadius: 999 },
+ iconAction: {
+ width: 44,
+ height: 44,
+ borderRadius: 22,
+ alignItems: "center",
+ justifyContent: "center",
+ },
trackRow: {
flexDirection: "row",
alignItems: "center",
diff --git a/apps/mobile/app/(app)/(tabs)/home/artist/[id].tsx b/apps/mobile/app/(app)/(tabs)/home/artist/[id].tsx
index 04c11ce..96300e9 100644
--- a/apps/mobile/app/(app)/(tabs)/home/artist/[id].tsx
+++ b/apps/mobile/app/(app)/(tabs)/home/artist/[id].tsx
@@ -92,15 +92,30 @@ export default function ArtistScreen() {
/>
{data.artist.name}
- void playArtist(data.artist.id)} />
- void playArtistShuffled(data.artist.id)} />
- void toggleArtistFavorite(data.artist.id)} hitSlop={8}>
+ void toggleArtistFavorite(data.artist.id)}
+ hitSlop={8}
+ style={[styles.iconAction, { backgroundColor: colors.muted }]}
+ >
+ void playArtist(data.artist.id)}
+ style={styles.playButton}
+ />
+ void playArtistShuffled(data.artist.id)}
+ style={styles.sideActionButton}
+ />
@@ -122,6 +137,15 @@ const styles = StyleSheet.create({
},
title: { fontSize: 28, fontWeight: "800", textAlign: "center" },
actions: { flexDirection: "row", alignItems: "center", gap: spacing.sm, marginTop: spacing.sm },
+ playButton: { borderRadius: 999, minWidth: 160 },
+ sideActionButton: { borderRadius: 999 },
+ iconAction: {
+ width: 44,
+ height: 44,
+ borderRadius: 22,
+ alignItems: "center",
+ justifyContent: "center",
+ },
section: { padding: spacing.lg, gap: spacing.md },
sectionTitle: { fontSize: 20, fontWeight: "700" },
})
diff --git a/apps/mobile/app/(app)/(tabs)/home/playlist/[id].tsx b/apps/mobile/app/(app)/(tabs)/home/playlist/[id].tsx
index e1589c6..8cd88c1 100644
--- a/apps/mobile/app/(app)/(tabs)/home/playlist/[id].tsx
+++ b/apps/mobile/app/(app)/(tabs)/home/playlist/[id].tsx
@@ -5,7 +5,10 @@ import { Ionicons } from "@expo/vector-icons"
import { CoverImage } from "@/components/cover-image"
-import { MediaActionMenu } from "@/components/media-actions-sheet"
+import {
+ MediaActionMenu,
+ type MediaAction,
+} from "@/components/media-actions-sheet"
import { Button, LoadingView } from "@/components/ui/primitives"
import { contentBottomInset, SongRow } from "@/components/player"
import { useFavorites } from "@/contexts/favorites"
@@ -98,6 +101,15 @@ export default function PlaylistScreen() {
}
}
+ function handlePlaylistMenuAction(action: MediaAction) {
+ if (action === "delete-playlist") {
+ void handleDelete()
+ return
+ }
+
+ void handlePlaylistDetailAction(songIds, action)
+ }
+
return (
<>
- void handlePlaylistDetailAction(songIds, action)
+ includeActions={
+ playlist.isOwner && playlist.id
+ ? [
+ "share",
+ "playlist",
+ "play-next",
+ "play-last",
+ "shuffle",
+ "favorite",
+ "delete-playlist",
+ ]
+ : undefined
}
+ onAction={handlePlaylistMenuAction}
>
@@ -137,23 +160,29 @@ export default function PlaylistScreen() {
{playlist.title}
{playlist.owner.name}
- playlist.id && void playPlaylist(playlist.id)} />
+ {!playlist.isOwner && playlist.id ? (
+ void handleSubscribeToggle()}
+ style={styles.sideActionButton}
+ />
+ ) : null}
+ playlist.id && void playPlaylist(playlist.id)}
+ style={styles.playButton}
+ />
playlist.id && void playPlaylistShuffled(playlist.id)}
+ style={styles.sideActionButton}
/>
- {!playlist.isOwner && playlist.id ? (
- void handleSubscribeToggle()}
- />
- ) : null}
- {playlist.isOwner && playlist.id ? (
- void handleDelete()} />
- ) : null}
{playlist.songs.map((song: BrowseSong) => (
@@ -204,5 +233,12 @@ const styles = StyleSheet.create({
borderRadius: radius.lg,
},
title: { fontSize: 24, fontWeight: "800", textAlign: "center" },
- actions: { flexDirection: "row", gap: spacing.sm, marginTop: spacing.sm },
+ actions: {
+ flexDirection: "row",
+ alignItems: "center",
+ gap: spacing.sm,
+ marginTop: spacing.sm,
+ },
+ playButton: { borderRadius: 999, minWidth: 160 },
+ sideActionButton: { borderRadius: 999 },
})
diff --git a/apps/mobile/app/(app)/(tabs)/home/playlist/favorites.tsx b/apps/mobile/app/(app)/(tabs)/home/playlist/favorites.tsx
index e43af71..819e26e 100644
--- a/apps/mobile/app/(app)/(tabs)/home/playlist/favorites.tsx
+++ b/apps/mobile/app/(app)/(tabs)/home/playlist/favorites.tsx
@@ -90,11 +90,18 @@ export default function FavoritesScreen() {
{favorites.title}
- void playInOrder(songIds)} />
+ void playInOrder(songIds)}
+ style={styles.playButton}
+ />
void playShuffled(songIds)}
+ style={styles.sideActionButton}
/>
@@ -135,4 +142,6 @@ const styles = StyleSheet.create({
},
title: { fontSize: 24, fontWeight: "800" },
actions: { flexDirection: "row", gap: spacing.sm, marginTop: spacing.sm },
+ playButton: { borderRadius: 999, minWidth: 160 },
+ sideActionButton: { borderRadius: 999 },
})
diff --git a/apps/mobile/components/media-context-menu.tsx b/apps/mobile/components/media-context-menu.tsx
index 08a9386..5084714 100644
--- a/apps/mobile/components/media-context-menu.tsx
+++ b/apps/mobile/components/media-context-menu.tsx
@@ -16,6 +16,7 @@ export type MediaAction =
| "favorite"
| "go-artist"
| "go-album"
+ | "delete-playlist"
export type MediaNavigation = {
artist?: { id: string }
@@ -86,6 +87,11 @@ const MEDIA_ACTION_ITEMS: {
`${favorited ? "Unfavorite" : "Favorite"}${countSuffix}`,
image: "star",
},
+ {
+ action: "delete-playlist",
+ label: () => "Delete Playlist",
+ image: "trash",
+ },
]
function isActionIncluded(
@@ -96,6 +102,10 @@ function isActionIncluded(
return config.includeActions.includes(action)
}
+ if (action === "delete-playlist") {
+ return false
+ }
+
if (action === "share") {
return shouldShowShare(config.share, config.selectedCount ?? 1)
}
diff --git a/apps/mobile/components/ui/primitives.tsx b/apps/mobile/components/ui/primitives.tsx
index acabeda..b8f5f56 100644
--- a/apps/mobile/components/ui/primitives.tsx
+++ b/apps/mobile/components/ui/primitives.tsx
@@ -2,12 +2,15 @@ import {
ActivityIndicator,
Pressable,
PressableProps,
+ StyleProp,
StyleSheet,
Text,
TextInput,
TextInputProps,
View,
+ ViewStyle,
} from "react-native"
+import { Ionicons } from "@expo/vector-icons"
import { radius, spacing, useThemeColors } from "@/lib/theme"
@@ -15,7 +18,8 @@ type ButtonProps = Omit & {
title: string
variant?: "primary" | "secondary" | "ghost" | "destructive"
loading?: boolean
- style?: PressableProps["style"]
+ icon?: React.ComponentProps["name"]
+ style?: StyleProp
}
export function Button({
@@ -23,6 +27,8 @@ export function Button({
variant = "primary",
loading = false,
disabled,
+ icon,
+ style,
...props
}: ButtonProps) {
const colors = useThemeColors()
@@ -48,21 +54,22 @@ export function Button({
({
- minHeight: 44,
- borderRadius: radius.md,
- alignItems: "center",
- justifyContent: "center",
- paddingHorizontal: spacing.lg,
- paddingVertical: spacing.sm,
- backgroundColor,
- opacity: isDisabled ? 0.5 : pressed ? 0.85 : 1,
- })}
+ style={({ pressed }) => [
+ styles.button,
+ {
+ backgroundColor,
+ opacity: isDisabled ? 0.5 : pressed ? 0.85 : 1,
+ },
+ style,
+ ]}
>
{loading ? (
) : (
- {title}
+
+ {icon ? : null}
+ {title}
+
)}
)
@@ -114,6 +121,12 @@ const styles = StyleSheet.create({
paddingHorizontal: spacing.lg,
paddingVertical: spacing.sm,
},
+ buttonContent: {
+ flexDirection: "row",
+ alignItems: "center",
+ justifyContent: "center",
+ gap: spacing.xs,
+ },
buttonText: {
fontSize: 16,
fontWeight: "600",