Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

add signup and forgot password screen

thewisefarmerrdcb088e68fd9
diff --git a/apps/mobile/src/common/common.js b/apps/mobile/src/common/common.js
index d6f22875d..b4f1de934 100755
--- a/apps/mobile/src/common/common.js
+++ b/apps/mobile/src/common/common.js
@@ -50,7 +50,7 @@ export const SIZE = {
md: 18,
lg: 22,
xl: 28,
- xxl: 34,
+ xxl: 32,
xxxl: 40,
};
diff --git a/apps/mobile/src/components/Recents/index.js b/apps/mobile/src/components/Recents/index.js
index df72c3579..b9df045f2 100644
--- a/apps/mobile/src/components/Recents/index.js
+++ b/apps/mobile/src/components/Recents/index.js
@@ -124,7 +124,6 @@ export const RecentList = () => {
onPress={item.func}
activeOpacity={opacity}
style={{
- ...getElevation(5),
width: 100,
height: 100,
borderRadius: br,
@@ -135,7 +134,7 @@ export const RecentList = () => {
marginRight: 30,
marginLeft: 5,
marginVertical: 20,
- marginBottom: 30,
+ marginBottom: 20,
}}>
<View
style={{
@@ -163,6 +162,32 @@ export const RecentList = () => {
</TouchableOpacity>
))}
</ScrollView>
+ <TouchableOpacity
+ style={{
+ width: '90%',
+ alignSelf: 'center',
+ backgroundColor: 'red',
+ padding: pv,
+ borderRadius: 5,
+ flexDirection: 'row',
+ justifyContent: 'space-between',
+ marginBottom: 10,
+ }}>
+ <Text
+ style={{
+ fontFamily: WEIGHT.bold,
+ color: 'white',
+ }}>
+ Sync Disabled
+ </Text>
+ <Text
+ style={{
+ fontFamily: WEIGHT.medium,
+ color: 'white',
+ }}>
+ Fix Now
+ </Text>
+ </TouchableOpacity>
</>
}
renderItem={({item, index}) => <NoteItem item={item} index={index} />}
diff --git a/apps/mobile/src/components/SearchInput/index.js b/apps/mobile/src/components/SearchInput/index.js
index d5ae7074a..43f740cd3 100644
--- a/apps/mobile/src/components/SearchInput/index.js
+++ b/apps/mobile/src/components/SearchInput/index.js
@@ -18,7 +18,6 @@ export const Search = () => {
return (
<View
style={{
- ...getElevation(10),
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
@@ -39,6 +38,7 @@ export const Search = () => {
}}
numberOfLines={1}
placeholder="Search your notes"
+ placeholderTextColor={colors.icon}
/>
<Icon
style={{paddingRight: '2.5%'}}
diff --git a/apps/mobile/src/services/NavigationService.js b/apps/mobile/src/services/NavigationService.js
index ed5569345..a8c514a50 100755
--- a/apps/mobile/src/services/NavigationService.js
+++ b/apps/mobile/src/services/NavigationService.js
@@ -9,6 +9,8 @@ import Favorites from '../views/Favorites';
import ListsEditor from '../views/ListsEditor';
import ReminderEditor from '../views/ReminderEditor';
import Login from '../views/Login';
+import Signup from '../views/Signup';
+import ForgotPassword from '../views/ForgotPassword';
const TopLevelNavigator = createStackNavigator(
{
@@ -39,6 +41,12 @@ const TopLevelNavigator = createStackNavigator(
Login: {
screen: Login,
},
+ Signup: {
+ screen: Signup,
+ },
+ ForgotPassword: {
+ screen: ForgotPassword,
+ },
},
{
initialRouteName: 'Home',
diff --git a/apps/mobile/src/views/ForgotPassword/index.js b/apps/mobile/src/views/ForgotPassword/index.js
index e69de29bb..48703746e 100644
--- a/apps/mobile/src/views/ForgotPassword/index.js
+++ b/apps/mobile/src/views/ForgotPassword/index.js
@@ -0,0 +1,128 @@
+import React, {useEffect, useState} from 'react';
+import {
+ ScrollView,
+ View,
+ Text,
+ TouchableOpacity,
+ Dimensions,
+ Image,
+ SafeAreaView,
+ Platform,
+ DeviceEventEmitter,
+} from 'react-native';
+import NavigationService from '../../services/NavigationService';
+import {
+ COLOR_SCHEME,
+ SIZE,
+ br,
+ ph,
+ pv,
+ opacity,
+ FONT,
+ WEIGHT,
+} from '../../common/common';
+import Icon from 'react-native-vector-icons/Ionicons';
+import {Reminder} from '../../components/Reminder';
+import {ListItem} from '../../components/ListItem';
+import {getElevation} from '../../utils/utils';
+import {FlatList, TextInput} from 'react-native-gesture-handler';
+import {NavigationEvents} from 'react-navigation';
+
+const w = Dimensions.get('window').width;
+const h = Dimensions.get('window').height;
+
+export const ForgotPassword = ({navigation}) => {
+ const [colors, setColors] = useState(COLOR_SCHEME);
+
+ useEffect(() => {
+ DeviceEventEmitter.emit('hide');
+ return () => {
+ DeviceEventEmitter.emit('show');
+ };
+ });
+
+ return (
+ <SafeAreaView>
+ <NavigationEvents
+ onWillFocus={() => {
+ DeviceEventEmitter.emit('hide');
+ }}
+ />
+ <View
+ style={{
+ flexDirection: 'row',
+ justifyContent: 'flex-start',
+ alignItems: 'center',
+ paddingHorizontal: '5%',
+ marginTop: Platform.OS == 'ios' ? h * 0.02 : h * 0.04,
+ marginBottom: h * 0.04,
+ }}>
+ <TouchableOpacity
+ style={{
+ paddingRight: 20,
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}>
+ <Icon name="ios-arrow-back" size={SIZE.xl} />
+ </TouchableOpacity>
+
+ <Text
+ style={{
+ fontSize: SIZE.xxl,
+ color: colors.pri,
+ fontFamily: WEIGHT.bold,
+ }}>
+ Recover Password
+ </Text>
+ </View>
+
+ <View
+ style={{
+ justifyContent: 'space-between',
+ height: '80%',
+ }}>
+ <View>
+ <TextInput
+ style={{
+ padding: pv,
+ backgroundColor: colors.navbg,
+ marginHorizontal: '5%',
+ borderRadius: 5,
+ fontSize: SIZE.md,
+ fontFamily: WEIGHT.regular,
+ marginBottom: 20,
+ }}
+ placeholder="Email"
+ placeholderTextColor={colors.icon}
+ />
+
+ <TouchableOpacity
+ activeOpacity={opacity}
+ style={{
+ padding: pv,
+ backgroundColor: colors.accent,
+ borderRadius: 5,
+ marginHorizontal: '5%',
+ marginBottom: 10,
+ alignItems: 'center',
+ }}>
+ <Text
+ style={{
+ fontSize: SIZE.md,
+ fontFamily: WEIGHT.medium,
+ color: 'white',
+ }}>
+ Recover
+ </Text>
+ </TouchableOpacity>
+ </View>
+ </View>
+ </SafeAreaView>
+ );
+};
+
+ForgotPassword.navigationOptions = {
+ header: null,
+};
+
+export default ForgotPassword;
diff --git a/apps/mobile/src/views/Home/index.js b/apps/mobile/src/views/Home/index.js
index 8117b4586..1f8e1e6de 100755
--- a/apps/mobile/src/views/Home/index.js
+++ b/apps/mobile/src/views/Home/index.js
@@ -83,7 +83,7 @@ export const Home = ({navigation}) => {
fontFamily: WEIGHT.regular,
color: colors.accent,
}}>
- Log in to Sync
+ Login to Sync
</Text>
</TouchableOpacity>
diff --git a/apps/mobile/src/views/Login/index.js b/apps/mobile/src/views/Login/index.js
index dd4c7cf16..01e3bd42b 100644
--- a/apps/mobile/src/views/Login/index.js
+++ b/apps/mobile/src/views/Login/index.js
@@ -51,126 +51,143 @@ export const Login = ({navigation}) => {
<View
style={{
flexDirection: 'row',
- justifyContent: 'space-between',
+ justifyContent: 'flex-start',
alignItems: 'center',
paddingHorizontal: '5%',
marginTop: Platform.OS == 'ios' ? h * 0.02 : h * 0.04,
marginBottom: h * 0.04,
}}>
+ <TouchableOpacity
+ style={{
+ paddingRight: 20,
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}>
+ <Icon name="ios-arrow-back" size={SIZE.xl} />
+ </TouchableOpacity>
<Text
style={{
fontSize: SIZE.xxl,
color: colors.pri,
fontFamily: WEIGHT.bold,
}}>
- Log in
+ Login
</Text>
</View>
- <View>
- <TextInput
- style={{
- padding: pv,
- backgroundColor: colors.navbg,
- marginHorizontal: '5%',
- borderRadius: 5,
- fontSize: SIZE.md,
- fontFamily: WEIGHT.regular,
- marginBottom: 20,
- }}
- placeholder="Email"
- placeholderTextColor={colors.icon}
- />
- <TextInput
- style={{
- padding: pv,
- backgroundColor: colors.navbg,
- marginHorizontal: '5%',
- borderRadius: 5,
- fontSize: SIZE.md,
- fontFamily: WEIGHT.regular,
- marginBottom: 20,
- }}
- placeholder="Password"
- placeholderTextColor={colors.icon}
- />
-
- <TouchableOpacity
- activeOpacity={opacity}
- style={{
- padding: pv,
- backgroundColor: colors.accent,
- borderRadius: 5,
- marginHorizontal: '5%',
- marginBottom: 10,
- }}>
- <Text
+ <View
+ style={{
+ justifyContent: 'space-between',
+ height: '80%',
+ }}>
+ <View>
+ <TextInput
style={{
+ padding: pv,
+ backgroundColor: colors.navbg,
+ marginHorizontal: '5%',
+ borderRadius: 5,
fontSize: SIZE.md,
fontFamily: WEIGHT.regular,
- color: 'white',
+ marginBottom: 20,
+ }}
+ placeholder="Email"
+ placeholderTextColor={colors.icon}
+ />
+ <TextInput
+ style={{
+ padding: pv,
+ backgroundColor: colors.navbg,
+ marginHorizontal: '5%',
+ borderRadius: 5,
+ fontSize: SIZE.md,
+ fontFamily: WEIGHT.regular,
+ marginBottom: 20,
+ }}
+ placeholder="Password"
+ placeholderTextColor={colors.icon}
+ />
+
+ <TouchableOpacity
+ activeOpacity={opacity}
+ style={{
+ padding: pv,
+ backgroundColor: colors.accent,
+ borderRadius: 5,
+ marginHorizontal: '5%',
+ marginBottom: 10,
+ alignItems: 'center',
}}>
- Log in
- </Text>
- </TouchableOpacity>
+ <Text
+ style={{
+ fontSize: SIZE.md,
+ fontFamily: WEIGHT.medium,
+ color: 'white',
+ }}>
+ Login
+ </Text>
+ </TouchableOpacity>
- <TouchableOpacity
- activeOpacity={opacity}
- style={{
- alignItems: 'flex-end',
- marginHorizontal: '5%',
- }}>
- <Text
+ <TouchableOpacity
+ onPress={() => {
+ NavigationService.navigate('ForgotPassword');
+ }}
+ activeOpacity={opacity}
style={{
- fontSize: SIZE.sm,
- fontFamily: WEIGHT.regular,
- color: colors.accent,
+ alignItems: 'flex-end',
+ marginHorizontal: '5%',
}}>
- Forgot password?
- </Text>
- </TouchableOpacity>
- </View>
+ <Text
+ style={{
+ fontSize: SIZE.sm,
+ fontFamily: WEIGHT.regular,
+ color: colors.accent,
+ }}>
+ Forgot password?
+ </Text>
+ </TouchableOpacity>
+ </View>
- <View
- style={{
- height: h * 0.25,
- position: 'absolute',
- top: h * 0.75,
- justifyContent: 'center',
- width: '100%',
- }}>
- <TouchableOpacity
- activeOpacity={opacity}
+ <View
style={{
- alignItems: 'center',
width: '100%',
- marginBottom: 20,
}}>
- <Text
+ <TouchableOpacity
+ activeOpacity={opacity}
style={{
- fontSize: SIZE.md,
- fontFamily: WEIGHT.regular,
- color: colors.accent,
+ alignItems: 'center',
+ width: '100%',
+ marginBottom: 20,
}}>
- Login with G
- </Text>
- </TouchableOpacity>
+ <Text
+ style={{
+ fontSize: SIZE.md,
+ fontFamily: WEIGHT.regular,
+ color: colors.accent,
+ }}>
+ Login with G
+ </Text>
+ </TouchableOpacity>
- <TouchableOpacity
- activeOpacity={opacity}
- style={{
- alignItems: 'center',
- width: '100%',
- }}>
- <Text
+ <TouchableOpacity
+ onPress={() => {
+ NavigationService.navigate('Signup');
+ }}
+ activeOpacity={opacity}
style={{
- fontSize: SIZE.sm,
- fontFamily: WEIGHT.regular,
- color: colors.accent,
+ alignItems: 'center',
+ width: '100%',
}}>
- Create a New Account
- </Text>
- </TouchableOpacity>
+ <Text
+ style={{
+ fontSize: SIZE.sm,
+ fontFamily: WEIGHT.bold,
+ color: colors.accent,
+ }}>
+ Create a New Account
+ </Text>
+ </TouchableOpacity>
+ </View>
</View>
</SafeAreaView>
);
diff --git a/apps/mobile/src/views/Signup/index.js b/apps/mobile/src/views/Signup/index.js
index e69de29bb..4a1a6a259 100644
--- a/apps/mobile/src/views/Signup/index.js
+++ b/apps/mobile/src/views/Signup/index.js
@@ -0,0 +1,163 @@
+import React, {useEffect, useState} from 'react';
+import {
+ ScrollView,
+ View,
+ Text,
+ TouchableOpacity,
+ Dimensions,
+ Image,
+ SafeAreaView,
+ Platform,
+ DeviceEventEmitter,
+} from 'react-native';
+import NavigationService from '../../services/NavigationService';
+import {
+ COLOR_SCHEME,
+ SIZE,
+ br,
+ ph,
+ pv,
+ opacity,
+ FONT,
+ WEIGHT,
+} from '../../common/common';
+import Icon from 'react-native-vector-icons/Ionicons';
+import {Reminder} from '../../components/Reminder';
+import {ListItem} from '../../components/ListItem';
+import {getElevation} from '../../utils/utils';
+import {FlatList, TextInput} from 'react-native-gesture-handler';
+import {NavigationEvents} from 'react-navigation';
+
+const w = Dimensions.get('window').width;
+const h = Dimensions.get('window').height;
+
+export const Signup = ({navigation}) => {
+ const [colors, setColors] = useState(COLOR_SCHEME);
+
+ useEffect(() => {
+ DeviceEventEmitter.emit('hide');
+ return () => {
+ DeviceEventEmitter.emit('show');
+ };
+ });
+
+ return (
+ <SafeAreaView>
+ <NavigationEvents
+ onWillFocus={() => {
+ DeviceEventEmitter.emit('hide');
+ }}
+ />
+ <View
+ style={{
+ flexDirection: 'row',
+ justifyContent: 'flex-start',
+ alignItems: 'center',
+ paddingHorizontal: '5%',
+ marginTop: Platform.OS == 'ios' ? h * 0.02 : h * 0.04,
+ marginBottom: h * 0.04,
+ }}>
+ <TouchableOpacity
+ style={{
+ paddingRight: 20,
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}>
+ <Icon name="ios-arrow-back" size={SIZE.xl} />
+ </TouchableOpacity>
+
+ <Text
+ style={{
+ fontSize: SIZE.xxl,
+ color: colors.pri,
+ fontFamily: WEIGHT.bold,
+ }}>
+ Create Account
+ </Text>
+ </View>
+
+ <View
+ style={{
+ justifyContent: 'space-between',
+ height: '80%',
+ }}>
+ <View>
+ <TextInput
+ style={{
+ padding: pv,
+ backgroundColor: colors.navbg,
+ marginHorizontal: '5%',
+ borderRadius: 5,
+ fontSize: SIZE.md,
+ fontFamily: WEIGHT.regular,
+ marginBottom: 20,
+ }}
+ placeholder="Email"
+ placeholderTextColor={colors.icon}
+ />
+ <TextInput
+ style={{
+ padding: pv,
+ backgroundColor: colors.navbg,
+ marginHorizontal: '5%',
+ borderRadius: 5,
+ fontSize: SIZE.md,
+ fontFamily: WEIGHT.regular,
+ marginBottom: 20,
+ }}
+ placeholder="Password"
+ placeholderTextColor={colors.icon}
+ />
+
+ <TouchableOpacity
+ activeOpacity={opacity}
+ style={{
+ padding: pv,
+ backgroundColor: colors.accent,
+ borderRadius: 5,
+ marginHorizontal: '5%',
+ marginBottom: 10,
+ alignItems: 'center',
+ }}>
+ <Text
+ style={{
+ fontSize: SIZE.md,
+ fontFamily: WEIGHT.medium,
+ color: 'white',
+ }}>
+ Signup
+ </Text>
+ </TouchableOpacity>
+ </View>
+
+ <View
+ style={{
+ width: '100%',
+ }}>
+ <TouchableOpacity
+ activeOpacity={opacity}
+ style={{
+ alignItems: 'center',
+ width: '100%',
+ marginBottom: 20,
+ }}>
+ <Text
+ style={{
+ fontSize: SIZE.md,
+ fontFamily: WEIGHT.regular,
+ color: colors.accent,
+ }}>
+ Signup with G
+ </Text>
+ </TouchableOpacity>
+ </View>
+ </View>
+ </SafeAreaView>
+ );
+};
+
+Signup.navigationOptions = {
+ header: null,
+};
+
+export default Signup;