Skip to content

Commit c1e9f98

Browse files
authored
Merge pull request exponential-inc#8 from theboi/master
List View Icons + Login Graphics
2 parents fb8cce5 + 0ddd670 commit c1e9f98

File tree

12 files changed

+315
-136
lines changed

12 files changed

+315
-136
lines changed

App.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {AppearanceProvider, Appearance} from 'react-native-appearance';
1818
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
1919
import {ApplicationProvider, Layout} from '@ui-kitten/components';
2020
import {mapping, light as lightTheme, dark as darkTheme} from '@eva-design/eva';
21-
import {SafeAreaView, View} from 'react-native';
21+
import {SafeAreaView, View, Dimensions} from 'react-native';
2222
// import AsyncStorage from '@react-native-community/async-storage';
2323

2424
import {K} from './src/store/constants';
@@ -27,6 +27,7 @@ import {HomePage} from './src/pages/Home';
2727
import {SettingsPage} from './src/pages/Settings';
2828
import {SettingsThemePage} from './src/pages/SettingsTheme';
2929
import {FindPage} from './src/pages/Find';
30+
import {LandingPage} from './src/pages/Landing';
3031
import {SettingsPeoplePage} from './src/pages/SettingsPeople';
3132

3233
import {store} from './index.js';
@@ -48,6 +49,8 @@ Appearance.addChangeListener(({colorScheme}) => {
4849
store.dispatch({type: 'SET_THEME_NATIVE', theme: colorScheme});
4950
});
5051

52+
Dimensions.addEventListener('change', () => store.dispatch({type: 'UPDATE_DEVICE_SIZE'}))
53+
5154
const App = (props: any) => {
5255
// const getSaved = async () => {
5356
// let raw;
@@ -116,11 +119,11 @@ const App = (props: any) => {
116119
tabBarOptions={{
117120
activeTintColor: themeColor.contrast,
118121
activeBackgroundColor: themeColor.secondaryBG,
119-
inactiveTintColor: 'gray',
122+
inactiveTintColor: `${themeColor.contrast}99`,
120123
inactiveBackgroundColor: themeColor.secondaryBG,
121124
style: {borderTopColor: themeColor.primaryBG},
122125
}}>
123-
<Tab.Screen name="Find" component={FindPage} />
126+
<Tab.Screen name="Find" component={LandingPage} />
124127
<Tab.Screen name="Home" component={HomePage} />
125128
<Tab.Screen name="Settings" component={SettingsPageNest} />
126129
</Tab.Navigator>

ios/lost.xcodeproj/project.pbxproj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
51F80220197E14FD7B54D841 /* libPods-lost-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C7ECD7A5478A1C3DE79FBCD /* libPods-lost-tvOSTests.a */; };
2121
6222EEF952E89D250E22E7B7 /* libPods-lostTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9ABEB3E7B315430FE932C817 /* libPods-lostTests.a */; };
2222
88033553C59A8F4898AB7032 /* libPods-lost-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 57690CF85F2E8B244B342D44 /* libPods-lost-tvOS.a */; };
23-
AA1A74F1242CBB60002FE857 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA1A74F0242CBB60002FE857 /* GoogleService-Info.plist */; };
24-
AA1A74F2242CBB60002FE857 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA1A74F0242CBB60002FE857 /* GoogleService-Info.plist */; };
25-
AA1A74F3242CBB60002FE857 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA1A74F0242CBB60002FE857 /* GoogleService-Info.plist */; };
26-
AA1A74F4242CBB60002FE857 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA1A74F0242CBB60002FE857 /* GoogleService-Info.plist */; };
23+
AA476EDE242CDE6500D8ED74 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA476EDD242CDE6500D8ED74 /* GoogleService-Info.plist */; };
24+
AA476EDF242CDE6500D8ED74 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA476EDD242CDE6500D8ED74 /* GoogleService-Info.plist */; };
25+
AA476EE0242CDE6500D8ED74 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA476EDD242CDE6500D8ED74 /* GoogleService-Info.plist */; };
26+
AA476EE1242CDE6500D8ED74 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA476EDD242CDE6500D8ED74 /* GoogleService-Info.plist */; };
2727
/* End PBXBuildFile section */
2828

2929
/* Begin PBXContainerItemProxy section */
@@ -63,7 +63,7 @@
6363
80CF4AF78CF8E221DFCEB1E6 /* Pods-lost-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-lost-tvOSTests.debug.xcconfig"; path = "Target Support Files/Pods-lost-tvOSTests/Pods-lost-tvOSTests.debug.xcconfig"; sourceTree = "<group>"; };
6464
9ABEB3E7B315430FE932C817 /* libPods-lostTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-lostTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
6565
A036699B034E20A65D33D9BA /* Pods-lost-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-lost-tvOS.release.xcconfig"; path = "Target Support Files/Pods-lost-tvOS/Pods-lost-tvOS.release.xcconfig"; sourceTree = "<group>"; };
66-
AA1A74F0242CBB60002FE857 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../../Downloads/GoogleService-Info.plist"; sourceTree = "<group>"; };
66+
AA476EDD242CDE6500D8ED74 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
6767
ADC5F6C3B9286FA673716C6F /* Pods-lostTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-lostTests.release.xcconfig"; path = "Target Support Files/Pods-lostTests/Pods-lostTests.release.xcconfig"; sourceTree = "<group>"; };
6868
ADD6F624A6E54D3D56499427 /* Pods-lost.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-lost.release.xcconfig"; path = "Target Support Files/Pods-lost/Pods-lost.release.xcconfig"; sourceTree = "<group>"; };
6969
CC84885D332AE50C2D0C8EA8 /* Pods-lostTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-lostTests.debug.xcconfig"; path = "Target Support Files/Pods-lostTests/Pods-lostTests.debug.xcconfig"; sourceTree = "<group>"; };
@@ -130,7 +130,7 @@
130130
13B07FAE1A68108700A75B9A /* lost */ = {
131131
isa = PBXGroup;
132132
children = (
133-
AA1A74F0242CBB60002FE857 /* GoogleService-Info.plist */,
133+
AA476EDD242CDE6500D8ED74 /* GoogleService-Info.plist */,
134134
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
135135
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
136136
13B07FB01A68108700A75B9A /* AppDelegate.m */,
@@ -342,7 +342,7 @@
342342
isa = PBXResourcesBuildPhase;
343343
buildActionMask = 2147483647;
344344
files = (
345-
AA1A74F2242CBB60002FE857 /* GoogleService-Info.plist in Resources */,
345+
AA476EDF242CDE6500D8ED74 /* GoogleService-Info.plist in Resources */,
346346
);
347347
runOnlyForDeploymentPostprocessing = 0;
348348
};
@@ -352,7 +352,7 @@
352352
files = (
353353
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
354354
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
355-
AA1A74F1242CBB60002FE857 /* GoogleService-Info.plist in Resources */,
355+
AA476EDE242CDE6500D8ED74 /* GoogleService-Info.plist in Resources */,
356356
);
357357
runOnlyForDeploymentPostprocessing = 0;
358358
};
@@ -361,15 +361,15 @@
361361
buildActionMask = 2147483647;
362362
files = (
363363
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
364-
AA1A74F3242CBB60002FE857 /* GoogleService-Info.plist in Resources */,
364+
AA476EE0242CDE6500D8ED74 /* GoogleService-Info.plist in Resources */,
365365
);
366366
runOnlyForDeploymentPostprocessing = 0;
367367
};
368368
2D02E48E1E0B4A5D006451C7 /* Resources */ = {
369369
isa = PBXResourcesBuildPhase;
370370
buildActionMask = 2147483647;
371371
files = (
372-
AA1A74F4242CBB60002FE857 /* GoogleService-Info.plist in Resources */,
372+
AA476EE1242CDE6500D8ED74 /* GoogleService-Info.plist in Resources */,
373373
);
374374
runOnlyForDeploymentPostprocessing = 0;
375375
};

src/components/Button/Login/index.tsx

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import React from 'react';
2+
import {
3+
ViewStyle,
4+
View,
5+
Text,
6+
Platform,
7+
ColorPropType,
8+
TextStyle,
9+
} from 'react-native';
10+
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
11+
12+
import {TouchableShadow} from '../../Shadow/Touchable';
13+
import {K} from '../../../store/constants';
14+
15+
const themeFont = Platform.OS === 'ios' ? K.fonts.ios : K.fonts.android;
16+
export const LoginButton = (props: {
17+
theme: string;
18+
title: string;
19+
onPress?(): void;
20+
style?: ViewStyle;
21+
color?: string;
22+
icon?: string;
23+
}) => {
24+
return (
25+
<View onTouchEnd={props.onPress}>
26+
<TouchableShadow
27+
theme={props.theme}
28+
style={{
29+
backgroundColor: 'white',
30+
alignSelf: 'center',
31+
paddingVertical: 12,
32+
paddingHorizontal: 25,
33+
borderRadius: 100,
34+
width: '70%',
35+
height: 60,
36+
margin: 5,
37+
...props.style,
38+
}}>
39+
<View style={{flexDirection: 'row', alignItems: 'center', justifyContent: 'center', marginTop: 7}}>
40+
{props.icon !== undefined ? (
41+
<Icon
42+
name={props.icon}
43+
size={20}
44+
style={{color: props.color, marginRight: 20}}
45+
/>
46+
) : null}
47+
<Text style={{...themeFont.body, color: props.color}}>
48+
{props.title}
49+
</Text>
50+
</View>
51+
</TouchableShadow>
52+
</View>
53+
);
54+
};

src/components/Button/Login/login.tsx

Lines changed: 0 additions & 54 deletions
This file was deleted.

src/components/Card/Content/index.tsx

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import React from 'react';
2+
import {ViewStyle, View, Text, Platform, ListRenderItem} from 'react-native';
3+
4+
import {TouchableShadow} from '../../Shadow/Touchable';
5+
import {K} from '../../../store/constants';
6+
import {ViewShadow} from '../../Shadow/View';
7+
import {List, ListItem, Layout} from '@ui-kitten/components';
8+
9+
export const ContentCard = (props: {
10+
theme: string;
11+
title: string;
12+
body: string;
13+
style?: ViewStyle;
14+
firstInPage?: boolean;
15+
renderItem?({item, index}): JSX.Element;
16+
backgroundColor?: string;
17+
gradient: boolean;
18+
}) => {
19+
const themeFont = Platform.OS === 'ios' ? K.fonts.ios : K.fonts.android;
20+
const themeColor = props.theme === 'dark' ? K.colors.dark : K.colors.light;
21+
22+
const renderItem = ({item, index}) => {
23+
return (
24+
<ListItem
25+
title={`${item.title}`}
26+
onPress={item.onPress}
27+
style={{height: 50}}
28+
titleStyle={{
29+
...themeFont.subhead,
30+
color: themeColor.primaryText,
31+
marginLeft: 10,
32+
}}
33+
/>
34+
);
35+
};
36+
37+
return (
38+
<ViewShadow
39+
theme={props.theme}
40+
style={{
41+
marginTop: props.firstInPage ? -20 : 0,
42+
marginBottom: 20,
43+
borderRadius: 20,
44+
...Platform.select({
45+
ios: {},
46+
android: {
47+
overflow: 'hidden',
48+
},
49+
}),
50+
}}>
51+
<Layout
52+
style={{
53+
overflow: 'hidden',
54+
borderRadius: 20,
55+
height: 100,
56+
padding: 15,
57+
backgroundColor: props.backgroundColor,
58+
}}>
59+
<Text style={{...themeFont.smallTitleE, color: themeColor.lightText}}>{props.title}</Text>
60+
<Text style={{...themeFont.body, color: themeColor.lightText}}>{props.body}</Text>
61+
</Layout>
62+
</ViewShadow>
63+
);
64+
};

src/components/Card/List/index.tsx

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ import {TouchableShadow} from '../../Shadow/Touchable';
55
import {K} from '../../../store/constants';
66
import {ViewShadow} from '../../Shadow/View';
77
import {List, ListItem} from '@ui-kitten/components';
8+
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
9+
import { Size } from '@ui-kitten/components/ui/measure/type';
810

911
export const ListCard = (props: {
1012
theme: string;
1113
data: ReadonlyArray<any> | null | undefined;
1214
style?: ViewStyle;
1315
firstInPage?: boolean;
14-
renderItem?({ item, index }): JSX.Element;
16+
renderItem?({item, index}): JSX.Element;
1517
}) => {
1618
const themeFont = Platform.OS === 'ios' ? K.fonts.ios : K.fonts.android;
1719
const themeColor = props.theme === 'dark' ? K.colors.dark : K.colors.light;
@@ -22,7 +24,33 @@ export const ListCard = (props: {
2224
title={`${item.title}`}
2325
onPress={item.onPress}
2426
style={{height: 50}}
25-
titleStyle={{...themeFont.subhead, color: themeColor.primaryText, marginLeft: 10}}
27+
titleStyle={{
28+
...themeFont.subhead,
29+
color: themeColor.primaryText,
30+
marginLeft: 10,
31+
}}
32+
icon={
33+
item.icon !== undefined
34+
? () => (
35+
<View
36+
style={{
37+
height: 35,
38+
width: 35,
39+
backgroundColor: item.iconColor,
40+
borderRadius: 5,
41+
}}>
42+
<View
43+
style={{alignItems: 'center'}}>
44+
<Icon
45+
name={item.icon}
46+
size={25}
47+
style={{color: themeColor.white, marginTop: 4}}
48+
/>
49+
</View>
50+
</View>
51+
)
52+
: null
53+
}
2654
/>
2755
);
2856
};
@@ -39,14 +67,25 @@ export const ListCard = (props: {
3967
ios: {},
4068
android: {
4169
overflow: 'hidden',
42-
}
43-
})
70+
},
71+
}),
4472
}}>
4573
<List
4674
data={props.data}
4775
renderItem={props.renderItem ?? renderItem}
4876
scrollEnabled={false}
4977
style={{overflow: 'hidden', borderRadius: 20}}
78+
ItemSeparatorComponent={() => (
79+
<View
80+
style={{
81+
height: 0.5,
82+
borderBottomColor: 'transparent',
83+
backgroundColor: `${themeColor.contrast}33`,
84+
marginTop: -0.5,
85+
marginLeft: 50,
86+
}}
87+
/>
88+
)}
5089
/>
5190
</ViewShadow>
5291
);

src/pages/Find/index.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@ import React from 'react';
22
import { Layout, Text } from '@ui-kitten/components';
33
import { connect } from 'react-redux';
44

5-
import { TouchableShadow } from '../../components/Shadow/Touchable';
5+
import { LoginButton } from '../../components/Button/Login';
66
import { PageHeader } from '../../components/Page/PageHeader';
7+
import { K } from '../../store/constants';
78

89
const FindPageC = (props: any) => {
10+
const themeColor = props.theme === 'dark' ? K.colors.dark : K.colors.light;
11+
912
return (
1013
<Layout style={{height: '100%'}}>
1114
<PageHeader theme={props.theme} title="Find" type='small' bottomBar={false} navigation={props.navigation}/>
15+
<LoginButton title='Login With Apple' theme={props.theme} icon='apple' style={{backgroundColor: themeColor.black}} color={themeColor.lightText} />
16+
<LoginButton title='Login With Google' theme={props.theme} icon='google' />
17+
<LoginButton title='Set Up Later' theme={props.theme} color={themeColor.black}/>
18+
1219
</Layout>
1320
)
1421
}

0 commit comments

Comments
 (0)