fix: SlideToConfirm gesture blocked by modal backdrop - restructure all payment modals

This commit is contained in:
Nemo
2026-03-24 13:09:53 +08:00
parent 065844b579
commit 024bb06205
4 changed files with 21 additions and 14 deletions

View File

@@ -289,8 +289,10 @@ export default function DashboardScreen() {
{/* ── Payment Modal ──────────────────────────────────────────────────── */}
<Modal visible={payModal} transparent animationType="slide" onRequestClose={closePay}>
<TouchableOpacity style={{ flex: 1, backgroundColor: 'rgba(0,0,0,0.4)' }} activeOpacity={1} onPress={closePay} />
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : undefined}>
<View style={{ flex: 1, backgroundColor: 'rgba(0,0,0,0.4)', justifyContent: 'flex-end' }}>
{/* Tap outside to dismiss — only on the dark area above the sheet */}
<TouchableOpacity style={{ flex: 1 }} activeOpacity={1} onPress={closePay} />
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : undefined}>
<View style={{ backgroundColor: '#fff', borderTopLeftRadius: 24, borderTopRightRadius: 24, padding: 24, paddingBottom: 40 }}>
{/* Handle */}
<View style={{ width: 40, height: 4, backgroundColor: '#E2E8F0', borderRadius: 2, alignSelf: 'center', marginBottom: 20 }} />
@@ -341,6 +343,7 @@ export default function DashboardScreen() {
/>
</View>
</KeyboardAvoidingView>
</View>
</Modal>
</SafeAreaView>
);