File tree Expand file tree Collapse file tree 3 files changed +42
-5
lines changed
Expand file tree Collapse file tree 3 files changed +42
-5
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,10 @@ export default function ImportModal() {
9696 const isPresented = router . canGoBack ( ) ;
9797
9898 return (
99- < KeyboardAwareScrollView style = { styles . container } >
99+ < KeyboardAwareScrollView
100+ style = { styles . container }
101+ keyboardShouldPersistTaps = "handled"
102+ >
100103 < View style = { [ styles . header , { paddingTop : insets . top + 16 } ] } >
101104 < Text style = { styles . headerTitle } > Import Recording</ Text >
102105 { isPresented && (
@@ -115,6 +118,7 @@ export default function ImportModal() {
115118 < TextInput
116119 style = { styles . titleInput }
117120 value = { title }
121+ autoFocus
118122 onChangeText = { setTitle }
119123 placeholder = "Enter recording name"
120124 placeholderTextColor = "#636366"
Original file line number Diff line number Diff line change @@ -29,9 +29,9 @@ export default function RecordingItem({
2929 onDelete,
3030 onNameChange,
3131} : RecordingItemProps ) {
32- const formatDuration = ( seconds : number ) => {
33- const mins = Math . floor ( seconds / 60 ) ;
34- const secs = Math . floor ( seconds % 60 ) ;
32+ const formatDuration = ( millisecond : number ) => {
33+ const mins = Math . floor ( millisecond / 60000 ) ;
34+ const secs = Math . floor ( ( millisecond % 60000 ) / 1000 ) ;
3535 return `${ mins } :${ secs . toString ( ) . padStart ( 2 , '0' ) } ` ;
3636 } ;
3737
Original file line number Diff line number Diff line change @@ -62,8 +62,16 @@ export default function RecordingsList({
6262 < View style = { styles . emptyContainer } >
6363 < Text style = { styles . emptyText } > No recordings yet</ Text >
6464 < Text style = { styles . emptySubtext } >
65- Tap RECORD to create your first haptic pattern
65+ Create a new haptic pattern or import an existing one
6666 </ Text >
67+ < View style = { styles . emptyButtonsContainer } >
68+ < Link href = "/import-modal" asChild >
69+ < TouchableOpacity style = { styles . emptyButton } >
70+ < Text style = { styles . emptyButtonIcon } > 📁</ Text >
71+ < Text style = { styles . emptyButtonText } > Import</ Text >
72+ </ TouchableOpacity >
73+ </ Link >
74+ </ View >
6775 </ View >
6876 ) ;
6977 }
@@ -151,5 +159,30 @@ const styles = StyleSheet.create({
151159 fontSize : 14 ,
152160 color : '#636366' ,
153161 textAlign : 'center' ,
162+ marginBottom : 32 ,
163+ } ,
164+ emptyButtonsContainer : {
165+ flexDirection : 'row' ,
166+ gap : 16 ,
167+ } ,
168+ emptyButton : {
169+ backgroundColor : '#1C1C1E' ,
170+ paddingHorizontal : 24 ,
171+ paddingVertical : 16 ,
172+ borderRadius : 16 ,
173+ alignItems : 'center' ,
174+ justifyContent : 'center' ,
175+ minWidth : 120 ,
176+ borderWidth : 1 ,
177+ borderColor : '#2C2C2E' ,
178+ } ,
179+ emptyButtonIcon : {
180+ fontSize : 32 ,
181+ marginBottom : 8 ,
182+ } ,
183+ emptyButtonText : {
184+ fontSize : 14 ,
185+ fontWeight : '600' ,
186+ color : '#FFFFFF' ,
154187 } ,
155188} ) ;
You can’t perform that action at this time.
0 commit comments