diff --git a/package.json b/package.json index 4a43483..fce0405 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@babel/runtime": "^7.25.6", "@react-native-async-storage/async-storage": "1.23.1", "@stripe/stripe-react-native": "0.38.3", + "expo-blur": "~13.0.2", "expo": "~51.0.0", "expo-auth-session": "~5.0.2", "expo-linear-gradient": "~12.7.2", diff --git a/src/components/TableBackground.js b/src/components/TableBackground.js index d9a16f2..97d98cf 100644 --- a/src/components/TableBackground.js +++ b/src/components/TableBackground.js @@ -28,7 +28,7 @@ export default function TableBackground({ children, style }) { const styles = StyleSheet.create({ wrapper: { width: '100%', - padding: 12 + padding: 0 }, edge: { flex: 1, @@ -36,7 +36,7 @@ const styles = StyleSheet.create({ borderTopRightRadius: 60, borderBottomLeftRadius: 280, borderBottomRightRadius: 280, - padding: 10 + padding: 6 }, felt: { flex: 1, @@ -44,7 +44,7 @@ const styles = StyleSheet.create({ borderTopRightRadius: 48, borderBottomLeftRadius: 260, borderBottomRightRadius: 260, - padding: 20, + padding: 14, overflow: 'hidden' }, innerRing: { diff --git a/src/screens/TableScreen.js b/src/screens/TableScreen.js index ab60558..5c6beb4 100644 --- a/src/screens/TableScreen.js +++ b/src/screens/TableScreen.js @@ -1,6 +1,7 @@ import { useEffect, useMemo, useRef, useState } from 'react'; import { Animated, Pressable, StyleSheet, Text, View } from 'react-native'; import { LinearGradient } from 'expo-linear-gradient'; +import { BlurView } from 'expo-blur'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { WS_URL } from '../api'; import { colors, fonts } from '../theme'; @@ -134,7 +135,7 @@ export default function TableScreen({ token, tableId, user, onLeave }) { styles.container, { paddingTop: insets.top + 12, - paddingBottom: insets.bottom + 16 + paddingBottom: insets.bottom + 12 } ]} > @@ -148,48 +149,55 @@ export default function TableScreen({ token, tableId, user, onLeave }) { - - - - + + + + + + + + {seats.map((seat) => ( + + + + ))} + - - {seats.map((seat) => ( - - + + + + + Tét + + adjustBet(-10)} style={[styles.betAdjust, bettingLocked && styles.betAdjustDisabled]} disabled={bettingLocked}> + - + + + adjustBet(10)} style={[styles.betAdjust, bettingLocked && styles.betAdjustDisabled]} disabled={bettingLocked}> + + + + + send({ type: 'bet', amount: betAmount })} variant="gold" disabled={bettingLocked} /> + send({ type: 'ready' })} variant="green" disabled={bettingLocked} /> - ))} + + + + {isMyTurn && turnSeconds !== null ? ( + Idő: {turnSeconds} mp + ) : null} + + send({ type: 'action', action: 'hit' })} variant="gold" disabled={!isMyTurn} /> + send({ type: 'action', action: 'stand' })} variant="gold" disabled={!isMyTurn} /> + send({ type: 'action', action: 'double' })} variant="gold" disabled={!isMyTurn} /> + + + + {message ? {message} : null} - - - - Tét - - adjustBet(-10)} style={[styles.betAdjust, bettingLocked && styles.betAdjustDisabled]} disabled={bettingLocked}> - - - - - adjustBet(10)} style={[styles.betAdjust, bettingLocked && styles.betAdjustDisabled]} disabled={bettingLocked}> - + - - - send({ type: 'bet', amount: betAmount })} variant="gold" disabled={bettingLocked} /> - send({ type: 'ready' })} variant="green" disabled={bettingLocked} /> - - - {isMyTurn && turnSeconds !== null ? ( - Idő: {turnSeconds} mp - ) : null} - - send({ type: 'action', action: 'hit' })} variant="gold" disabled={!isMyTurn} /> - send({ type: 'action', action: 'stand' })} variant="gold" disabled={!isMyTurn} /> - send({ type: 'action', action: 'double' })} variant="gold" disabled={!isMyTurn} /> - - {message ? {message} : null} - ); } @@ -197,10 +205,10 @@ export default function TableScreen({ token, tableId, user, onLeave }) { const styles = StyleSheet.create({ container: { flex: 1, - paddingHorizontal: 20 + paddingHorizontal: 12 }, topBar: { - paddingHorizontal: 20, + paddingHorizontal: 6, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' @@ -219,11 +227,19 @@ const styles = StyleSheet.create({ tableWrap: { flex: 1, justifyContent: 'center', - alignItems: 'center' + alignItems: 'center', + marginTop: 8, + marginBottom: 8, + width: '100%' }, tableSurface: { - aspectRatio: 1.8, - maxHeight: 420 + flex: 1, + width: '100%', + padding: 0 + }, + tableInner: { + flex: 1, + position: 'relative' }, dealerArea: { alignItems: 'center', @@ -243,16 +259,27 @@ const styles = StyleSheet.create({ width: 110, transform: [{ translateX: -55 }] }, - controls: { - paddingHorizontal: 20, - paddingBottom: 24 + controlsOverlay: { + position: 'absolute', + left: 12, + right: 12, + bottom: 14, + gap: 10 + }, + blurPanel: { + borderRadius: 18, + paddingVertical: 10, + paddingHorizontal: 12, + backgroundColor: 'rgba(10, 18, 14, 0.45)', + borderWidth: 1, + borderColor: 'rgba(255,255,255,0.12)', + overflow: 'hidden' }, betRow: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', - gap: 8, - marginBottom: 12 + gap: 8 }, betControls: { flexDirection: 'row', @@ -288,23 +315,23 @@ const styles = StyleSheet.create({ message: { color: colors.goldBright, textAlign: 'center', - marginTop: 10, + marginTop: 8, fontFamily: fonts.body }, timer: { color: colors.goldBright, textAlign: 'center', - marginBottom: 8, + marginBottom: 6, fontFamily: fonts.mono } }); const seatPositions = { - 0: { left: '12%', top: '55%' }, - 1: { left: '25%', top: '48%' }, - 2: { left: '38%', top: '42%' }, - 3: { left: '50%', top: '40%' }, - 4: { left: '62%', top: '42%' }, - 5: { left: '75%', top: '48%' }, - 6: { left: '88%', top: '55%' } + 0: { left: '10%', top: '50%' }, + 1: { left: '24%', top: '44%' }, + 2: { left: '38%', top: '38%' }, + 3: { left: '50%', top: '36%' }, + 4: { left: '62%', top: '38%' }, + 5: { left: '76%', top: '44%' }, + 6: { left: '90%', top: '50%' } };