From af96d301224dbc7315a336c43929b73509d37297 Mon Sep 17 00:00:00 2001 From: tapframe Date: Wed, 31 Dec 2025 03:26:25 +0530 Subject: [PATCH] ui changes --- .../player/modals/SubtitleSyncModal.tsx | 302 +++++++++++++----- 1 file changed, 214 insertions(+), 88 deletions(-) diff --git a/src/components/player/modals/SubtitleSyncModal.tsx b/src/components/player/modals/SubtitleSyncModal.tsx index 34603cc..440a48c 100644 --- a/src/components/player/modals/SubtitleSyncModal.tsx +++ b/src/components/player/modals/SubtitleSyncModal.tsx @@ -12,7 +12,19 @@ import { useWindowDimensions, StatusBar, BackHandler, + Platform, } from 'react-native'; +import { BlurView as ExpoBlurView } from 'expo-blur'; + +// Dynamically import community blur for Android +let AndroidBlurView: any = null; +if (Platform.OS === 'android') { + try { + AndroidBlurView = require('@react-native-community/blur').BlurView; + } catch (e) { + AndroidBlurView = null; + } +} import { MaterialIcons } from '@expo/vector-icons'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import Slider from '@react-native-community/slider'; @@ -265,103 +277,214 @@ export const SubtitleSyncModal: React.FC = ({ - {/* Right side - Controls */} - - {/* Offset display */} - - Delay - - {formatOffset(tempOffset)} - - + {/* Right side - Controls with blur background */} + {Platform.OS === 'android' && AndroidBlurView ? ( + + + {/* Offset display */} + + Delay + + {formatOffset(tempOffset)} + + - {/* Slider - horizontal with buttons */} - - + {/* Slider - horizontal with buttons */} + + + handleSliderChange(tempOffset - 0.1)} + style={[styles.nudgeBtn, isLargeScreen && styles.nudgeBtnLarge]} + > + + + + + + handleSliderChange(tempOffset + 0.1)} + style={[styles.nudgeBtn, isLargeScreen && styles.nudgeBtnLarge]} + > + + + + + -10s + +10s + + + + {/* Reset Button */} + handleSliderChange(tempOffset - 0.1)} - style={[styles.nudgeBtn, isLargeScreen && styles.nudgeBtnLarge]} + onPress={handleReset} + style={[ + styles.resetBtn, + isLargeScreen && styles.resetBtnLarge + ]} + activeOpacity={0.7} > - - - - - - handleSliderChange(tempOffset + 0.1)} - style={[styles.nudgeBtn, isLargeScreen && styles.nudgeBtnLarge]} - > - + + Reset - - -10s - +10s + + {/* Buttons - stacked vertically */} + + + OK + + + + CANCEL + + ) : ( + + {/* Offset display */} + + Delay + + {formatOffset(tempOffset)} + + - {/* Reset Button */} - - - - Reset - - + {/* Slider - horizontal with buttons */} + + + handleSliderChange(tempOffset - 0.1)} + style={[styles.nudgeBtn, isLargeScreen && styles.nudgeBtnLarge]} + > + + - {/* Buttons - stacked vertically */} - - - OK - + - - CANCEL - - - + handleSliderChange(tempOffset + 0.1)} + style={[styles.nudgeBtn, isLargeScreen && styles.nudgeBtnLarge]} + > + + + + + -10s + +10s + + + + {/* Reset Button */} + + + + Reset + + + + {/* Buttons - stacked vertically */} + + + OK + + + + CANCEL + + + + )} ); @@ -384,12 +507,15 @@ const styles = StyleSheet.create({ }, rightPanel: { width: 320, - backgroundColor: 'rgba(255,255,255,0.05)', paddingHorizontal: 24, paddingVertical: 32, justifyContent: 'space-between', alignItems: 'center', }, + androidRightPanelContainer: { + backgroundColor: 'rgba(20,20,20,0.85)', + overflow: 'hidden', + }, subtitleArea: { alignItems: 'center', width: '100%',