diff --git a/apps/mobile/components/player-artist-fallback-menu.ios.tsx b/apps/mobile/components/player-artist-fallback-menu.ios.tsx new file mode 100644 index 0000000..12993be --- /dev/null +++ b/apps/mobile/components/player-artist-fallback-menu.ios.tsx @@ -0,0 +1,56 @@ +import { + Button, + Host, + Label, + Menu, + RNHostView, + Text, + VStack, +} from "@expo/ui/swift-ui" +import { menuOrder } from "@expo/ui/swift-ui/modifiers" +import { StyleSheet, View } from "react-native" + +import type { PlayerArtistFallbackMenuProps } from "./player-artist-fallback-menu" + +// Use custom SwiftUI labels because the community menu adapter drops subtitles. +export function PlayerArtistFallbackMenu({ + song, + size, + onAction, +}: PlayerArtistFallbackMenuProps) { + return ( + + + + + } + > + + + + + ) +} diff --git a/apps/mobile/components/player-artist-fallback-menu.tsx b/apps/mobile/components/player-artist-fallback-menu.tsx new file mode 100644 index 0000000..c70a844 --- /dev/null +++ b/apps/mobile/components/player-artist-fallback-menu.tsx @@ -0,0 +1,35 @@ +import { StyleSheet, View } from "react-native" + +import { + MediaActionMenu, + type MediaAction, +} from "@/components/media-context-menu" +import type { BrowseSong } from "@otunes/convex/types" + +export type PlayerArtistFallbackMenuProps = { + song: BrowseSong + size: { width: number; height: number } + onAction: (action: MediaAction) => void +} + +export function PlayerArtistFallbackMenu({ + song, + size, + onAction, +}: PlayerArtistFallbackMenuProps) { + return ( + + + + ) +} diff --git a/apps/mobile/components/player-artist-menu.tsx b/apps/mobile/components/player-artist-menu.tsx index 1faf302..93518bf 100644 --- a/apps/mobile/components/player-artist-menu.tsx +++ b/apps/mobile/components/player-artist-menu.tsx @@ -2,10 +2,8 @@ import { requireNativeView, requireOptionalNativeModule } from "expo" import { useState, type ReactNode } from "react" import { Platform, StyleSheet, View, type ViewProps } from "react-native" -import { - MediaActionMenu, - type MediaAction, -} from "@/components/media-context-menu" +import type { MediaAction } from "@/components/media-context-menu" +import { PlayerArtistFallbackMenu } from "@/components/player-artist-fallback-menu" import type { BrowseSong } from "@otunes/convex/types" const NativeMenu = @@ -56,19 +54,7 @@ export function PlayerArtistMenu({ onAction={({ nativeEvent }) => onAction(nativeEvent.action)} /> ) : size.width > 0 ? ( - - - + ) : null} )