diff --git a/apps/mobile/app/(app)/player.tsx b/apps/mobile/app/(app)/player.tsx index 689e1dd..a6e75a9 100644 --- a/apps/mobile/app/(app)/player.tsx +++ b/apps/mobile/app/(app)/player.tsx @@ -74,11 +74,15 @@ const DISMISS_VELOCITY = 900 const DISMISS_CORNER_RADIUS = 48 export default function PlayerScreen() { - const isTablet = useTabletLayout() + const tabletLayout = useTabletLayout() const router = useRouter() const hadSongRef = useRef(false) const insets = useSafeAreaInsets() const { width: windowWidth, height: windowHeight } = useWindowDimensions() + // Unfolded iPhones retain the phone idiom but have room for the iPad player. + const isTablet = + tabletLayout || + (Platform.OS === "ios" && Math.min(windowWidth, windowHeight) >= 600) const { config } = useServerConfig() const { currentSong, diff --git a/apps/mobile/components/keyboard-form.tsx b/apps/mobile/components/keyboard-form.tsx index 64fa77a..e085e96 100644 --- a/apps/mobile/components/keyboard-form.tsx +++ b/apps/mobile/components/keyboard-form.tsx @@ -3,30 +3,40 @@ import { KeyboardAvoidingView, Platform, ScrollView, + StyleSheet, type StyleProp, type ViewStyle, } from "react-native" -/** Android resizes for the IME; scrolling keeps tall forms and actions reachable. */ +/** Center account forms on wide windows; scroll when the keyboard reduces height. */ export function KeyboardForm({ children, style, }: PropsWithChildren<{ style?: StyleProp }>) { - if (Platform.OS === "android") { - return ( + return ( + {children} - ) - } - return ( - - {children} ) } + +const styles = StyleSheet.create({ + fill: { flex: 1 }, + content: { + flex: undefined, + flexGrow: 1, + width: "100%", + maxWidth: 528, + alignSelf: "center", + }, +})