mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
minor fixes
This commit is contained in:
@@ -10,12 +10,19 @@ import {
|
|||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import {TextInput} from 'react-native-gesture-handler';
|
import {TextInput} from 'react-native-gesture-handler';
|
||||||
import QRCode from 'react-native-qrcode-generator';
|
import QRCode from 'react-native-qrcode-generator';
|
||||||
import { useIsFocused } from '@react-navigation/native';
|
import {useIsFocused} from '@react-navigation/native';
|
||||||
import {opacity, pv, SIZE, WEIGHT, ph} from '../../common/common';
|
import {opacity, pv, SIZE, WEIGHT, ph} from '../../common/common';
|
||||||
import {Header} from '../../components/header';
|
import {Header} from '../../components/header';
|
||||||
import {useTracked} from '../../provider';
|
import {useTracked} from '../../provider';
|
||||||
import {eSubscribeEvent, eUnSubscribeEvent} from '../../services/eventManager';
|
import {
|
||||||
import {eLoginDialogNavigateBack} from '../../services/events';
|
eSubscribeEvent,
|
||||||
|
eUnSubscribeEvent,
|
||||||
|
eSendEvent,
|
||||||
|
} from '../../services/eventManager';
|
||||||
|
import {
|
||||||
|
eLoginDialogNavigateBack,
|
||||||
|
eCloseLoginDialog,
|
||||||
|
} from '../../services/events';
|
||||||
import * as Animatable from 'react-native-animatable';
|
import * as Animatable from 'react-native-animatable';
|
||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
import {
|
import {
|
||||||
@@ -32,7 +39,7 @@ const _pass = createRef();
|
|||||||
const _username = createRef();
|
const _username = createRef();
|
||||||
const _passConfirm = createRef();
|
const _passConfirm = createRef();
|
||||||
const _passContainer = createRef();
|
const _passContainer = createRef();
|
||||||
export const Signup = ({route,navigation}) => {
|
export const Signup = ({route, navigation}) => {
|
||||||
const [state, dispatch] = useTracked();
|
const [state, dispatch] = useTracked();
|
||||||
const {colors, isLoginNavigator} = state;
|
const {colors, isLoginNavigator} = state;
|
||||||
const [signingIn, setSigningIn] = useState(false);
|
const [signingIn, setSigningIn] = useState(false);
|
||||||
@@ -46,7 +53,9 @@ export const Signup = ({route,navigation}) => {
|
|||||||
const [failed, setFailed] = useState(false);
|
const [failed, setFailed] = useState(false);
|
||||||
const [modalVisible, setModalVisible] = useState(false);
|
const [modalVisible, setModalVisible] = useState(false);
|
||||||
const [confirmPassword, setConfirmPassword] = useState(false);
|
const [confirmPassword, setConfirmPassword] = useState(false);
|
||||||
const [key, setKey] = useState('xyzLLbr1tafjdfklsdfjlksafjhklfadsafsljkfsfadfljkdfassafsafaffasdfsafafs');
|
const [key, setKey] = useState(
|
||||||
|
'xyzLLbr1tafjdfklsdfjlksafjhklfadsafsljkfsfadfljkdfassafsafaffasdfsafafs',
|
||||||
|
);
|
||||||
const [passwordReEnter, setPasswordReEnter] = useState(null);
|
const [passwordReEnter, setPasswordReEnter] = useState(null);
|
||||||
const [secureEntry, setSecureEntry] = useState(true);
|
const [secureEntry, setSecureEntry] = useState(true);
|
||||||
let isFocused = useIsFocused();
|
let isFocused = useIsFocused();
|
||||||
@@ -83,7 +92,7 @@ export const Signup = ({route,navigation}) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let user;
|
let user;
|
||||||
try {
|
try {
|
||||||
user = await db.user.user.get();
|
user = await db.user.user.get();
|
||||||
setStatus('Logging you in...');
|
setStatus('Logging you in...');
|
||||||
@@ -114,7 +123,7 @@ export const Signup = ({route,navigation}) => {
|
|||||||
<Modal
|
<Modal
|
||||||
animated={true}
|
animated={true}
|
||||||
animationType="fade"
|
animationType="fade"
|
||||||
visible={modalVisible}
|
visible={true}
|
||||||
transparent={true}>
|
transparent={true}>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
@@ -126,6 +135,7 @@ export const Signup = ({route,navigation}) => {
|
|||||||
style={{
|
style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
backgroundColor: colors.bg,
|
backgroundColor: colors.bg,
|
||||||
|
paddingHorizontal: DDS.isTab ? '20%' : '0%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
@@ -139,7 +149,6 @@ export const Signup = ({route,navigation}) => {
|
|||||||
}}>
|
}}>
|
||||||
Hi there!
|
Hi there!
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
fontFamily: WEIGHT.regular,
|
fontFamily: WEIGHT.regular,
|
||||||
@@ -148,9 +157,8 @@ export const Signup = ({route,navigation}) => {
|
|||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
color: colors.pri,
|
color: colors.pri,
|
||||||
}}>
|
}}>
|
||||||
All your data is end-to-end encrypted. This
|
All your data is end-to-end encrypted. This means that we cannot
|
||||||
means that we cannot read your data or recover your password if
|
read your data or recover your password if you forget it.{' '}
|
||||||
you forget it.{' '}
|
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
color: colors.errorText,
|
color: colors.errorText,
|
||||||
@@ -198,7 +206,7 @@ export const Signup = ({route,navigation}) => {
|
|||||||
fontSize: SIZE.sm,
|
fontSize: SIZE.sm,
|
||||||
width: '85%',
|
width: '85%',
|
||||||
maxWidth: '85%',
|
maxWidth: '85%',
|
||||||
paddingRight:10,
|
paddingRight: 10,
|
||||||
color: colors.icon,
|
color: colors.icon,
|
||||||
}}>
|
}}>
|
||||||
{key}
|
{key}
|
||||||
@@ -219,8 +227,10 @@ export const Signup = ({route,navigation}) => {
|
|||||||
|
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
|
DDS.isTab
|
||||||
|
? eSendEvent(eCloseLoginDialog)
|
||||||
|
: navigation.navigate('Home');
|
||||||
setModalVisible(false);
|
setModalVisible(false);
|
||||||
navigation.navigate('Home');
|
|
||||||
}}
|
}}
|
||||||
activeOpacity={opacity}
|
activeOpacity={opacity}
|
||||||
style={{
|
style={{
|
||||||
@@ -502,7 +512,7 @@ export const Signup = ({route,navigation}) => {
|
|||||||
style={{
|
style={{
|
||||||
borderWidth: 1.5,
|
borderWidth: 1.5,
|
||||||
borderColor: colors.nav,
|
borderColor: colors.nav,
|
||||||
paddingHorizontal:10,
|
paddingHorizontal: 10,
|
||||||
borderRadius: 5,
|
borderRadius: 5,
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
@@ -534,7 +544,6 @@ export const Signup = ({route,navigation}) => {
|
|||||||
borderColor: colors.errorText,
|
borderColor: colors.errorText,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
setInvalidPassword(false);
|
setInvalidPassword(false);
|
||||||
_passContainer.current?.setNativeProps({
|
_passContainer.current?.setNativeProps({
|
||||||
@@ -566,8 +575,8 @@ export const Signup = ({route,navigation}) => {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
style={{
|
style={{
|
||||||
paddingVertical:pv,
|
paddingVertical: pv,
|
||||||
paddingHorizontal:0,
|
paddingHorizontal: 0,
|
||||||
fontSize: SIZE.sm,
|
fontSize: SIZE.sm,
|
||||||
fontFamily: WEIGHT.regular,
|
fontFamily: WEIGHT.regular,
|
||||||
width: '85%',
|
width: '85%',
|
||||||
@@ -671,7 +680,7 @@ export const Signup = ({route,navigation}) => {
|
|||||||
width: '100%',
|
width: '100%',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
height: 150,
|
height: 75,
|
||||||
}}>
|
}}>
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
@@ -703,6 +712,4 @@ export const Signup = ({route,navigation}) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default Signup;
|
export default Signup;
|
||||||
|
|||||||
Reference in New Issue
Block a user