Skip to content

Commit ba09493

Browse files
committed
feat: Add Coordinate Notes screens
1 parent 6e50871 commit ba09493

16 files changed

+263
-77
lines changed

App.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ import { queryClient } from '@query/index'
77
import { NavigationContainer, useNavigation } from '@react-navigation/native'
88
import { CardStyleInterpolators, createStackNavigator, type StackNavigationOptions } from '@react-navigation/stack'
99
import ComputerScienceSettings from '@screens/ComputerScience/ComputerScienceSettings'
10+
import CoordinateNotes from '@screens/CoordinateNotes/CoordinateNotes'
1011
import DeveloperOptions from '@screens/DeveloperOptions/DeveloperOptions'
1112
import MMKVDataEditor, { type MMKVDataEditorParamList } from '@screens/DeveloperOptions/MMKVDataEditor'
1213
import MMKVDataList from '@screens/DeveloperOptions/MMKVDataList'
14+
import Skia from '@screens/Example/Skia'
1315
import Explore from '@screens/Explore/Explore'
1416
import Greeting from '@screens/Home/Greeting'
17+
import fabStyles from '@screens/Home/styles/fabStyles'
1518
import NotesWelcome from '@screens/Notes/NotesWelcome'
1619
import type { ChartParamList } from '@screens/OS/Chart'
1720
import Chart from '@screens/OS/Chart'
@@ -56,7 +59,7 @@ import { Dimensions, SafeAreaView, useColorScheme } from 'react-native'
5659
import { GestureHandlerRootView } from 'react-native-gesture-handler'
5760
import Animated, { ZoomIn, ZoomOut } from 'react-native-reanimated'
5861
import './global.css'
59-
import Skia from '@screens/Example/Skia'
62+
import NewCoordinateNotes from '@screens/CoordinateNotes/NewCoordinateNotes'
6063

6164
function App(): React.JSX.Element {
6265
const scheme = useColorScheme()
@@ -129,7 +132,6 @@ export type RootStackParamList = {
129132
MMKVDataList: undefined
130133
UiAndComponents: undefined
131134
BlankSettings: undefined
132-
CoordinateNotes: undefined
133135
TempUnit: undefined
134136
DistanceUnit: undefined
135137
WindSpeedUnit: undefined
@@ -160,6 +162,8 @@ export type RootStackParamList = {
160162
Chart: ChartParamList
161163
Onboarding: undefined
162164
Skia: undefined
165+
CoordinateNotes: undefined
166+
NewCoordinateNotes: undefined
163167
}
164168

165169
const Stack = createStackNavigator<RootStackParamList>()
@@ -258,6 +262,8 @@ function Navigation() {
258262
<Stack.Screen name='SJF' component={SJF} options={GestureEnabled} />
259263
<Stack.Screen name='Chart' component={Chart} options={IOS_BOTTOM_STYLE} />
260264
<Stack.Screen name='Onboarding' component={Onboarding} options={NO_ANIMATION} />
265+
<Stack.Screen name='CoordinateNotes' component={CoordinateNotes} options={GestureEnabled} />
266+
<Stack.Screen name='NewCoordinateNotes' component={NewCoordinateNotes} options={IOS_BOTTOM_STYLE} />
261267
</Stack.Navigator>
262268
</>
263269
)

src/assets/animations/animations.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const Animations = {
33
'coming-soon': require('./lottie/coming-soon.lottie'),
44
welcome: require('./lottie/welcome.lottie'),
55
lock: require('./lottie/lock.lottie'),
6+
location: require('./lottie/location.lottie'),
67
}
78

89
export default Animations
26.6 KB
Binary file not shown.

src/assets/icons/icons.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,9 @@ export { default as SmileSolidIcon } from '@icons/smile-solid-rounded.svg'
139139
export { default as PlaySolidIcon } from '@icons/play-solid-rounded.svg'
140140
export { default as ReloadIcon } from '@icons/reload-solid-rounded.svg'
141141
export { default as ReactIcon } from '@icons/react-solid-rounded.svg'
142+
export { default as LongitudeIcon } from '@icons/longitude-solid-rounded.svg'
143+
export { default as LatitudeIcon } from '@icons/latitude-solid-rounded.svg'
144+
export { default as DashboardSpeed02Icon } from '@icons/dashboard-speed-02-solid-rounded.svg'
145+
export { default as Rocket01Icon } from '@icons/rocket-01-solid-rounded.svg'
146+
export { default as EarthIcon } from '@icons/earth-solid-rounded.svg'
147+
export { default as Timer02Icon } from '@icons/timer-02-solid-rounded.svg'
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import { PlusSignSolidIcon } from '@assets/icons/icons'
2+
import Press from '@components/Press'
3+
import SettWrapper from '@components/Settings/SettWrapper'
4+
import { useNavigation } from '@react-navigation/native'
5+
import fabStyles from '@screens/Home/styles/fabStyles'
6+
import type { NavProp, StackNav } from '@utils/types'
7+
import Animated, { ZoomIn, ZoomOut } from 'react-native-reanimated'
8+
import { useSafeAreaInsets } from 'react-native-safe-area-context'
9+
import NoNotes from './NoCoordinateNotes'
10+
11+
export default function CoordinateNotes({ navigation }: NavProp) {
12+
return (
13+
<>
14+
<SettWrapper navigation={navigation} title='Coordinate Notes'>
15+
<NoNotes />
16+
</SettWrapper>
17+
<FabButton />
18+
</>
19+
)
20+
}
21+
22+
export const FabButton = () => {
23+
const navigation = useNavigation<StackNav>()
24+
const bottom = useSafeAreaInsets().bottom
25+
26+
return (
27+
<Animated.View
28+
entering={ZoomIn.duration(200)}
29+
exiting={ZoomOut.duration(200)}
30+
className='absolute right-5 z-10'
31+
style={{ bottom: bottom + 15 }}
32+
>
33+
<Press
34+
style={fabStyles.fabShadow}
35+
onPress={() => navigation.navigate('NewCoordinateNotes')}
36+
activeOpacity={0.9}
37+
activeScale={0.95}
38+
className='items-center justify-center rounded-full bg-accent'
39+
>
40+
<PlusSignSolidIcon color={'white'} height={25} width={25} />
41+
</Press>
42+
</Animated.View>
43+
)
44+
}

0 commit comments

Comments
 (0)