diff --git a/src/Main.tsx b/src/Main.tsx index 265b7e2..023e0c1 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -1,6 +1,5 @@ import React, { useEffect, useRef, useState } from 'react'; -import { SafeAreaView, StyleSheet, useColorScheme, DeviceEventEmitter } from 'react-native'; -import { Colors } from 'react-native/Libraries/NewAppScreen'; +import { SafeAreaView, StyleSheet, DeviceEventEmitter } from 'react-native'; import AsyncStorage from '@react-native-async-storage/async-storage'; import DiscoveryScreen from './components/steps/DiscoveryScreen'; @@ -20,7 +19,6 @@ enum Step { } const Main = () => { - const isDarkMode = useColorScheme() === 'dark'; const [isModalVisible, setIsModalVisible] = useState(false); const [step, setStep] = useState(Step.Discovery); @@ -134,10 +132,6 @@ const Main = () => { } }); - const backgroundStyle = { - backgroundColor: isDarkMode ? Colors.darker : Colors.lighter, - }; - const connectCard = async () => { if (await Keycard.nfcIsSupported() && !await Keycard.nfcIsEnabled()) { await Keycard.openNfcSettings(); @@ -168,7 +162,7 @@ const Main = () => { } return ( - + {step == Step.Discovery && } {step == Step.Initialization && } {step == Step.Loading && } @@ -180,6 +174,7 @@ const Main = () => { const styles = StyleSheet.create({ container: { + backgroundColor: '#222222', width: '100%', height: '100%' }, diff --git a/src/NFCModal.tsx b/src/NFCModal.tsx index a7c6b77..b495d6d 100644 --- a/src/NFCModal.tsx +++ b/src/NFCModal.tsx @@ -1,8 +1,7 @@ -import React, {FC, useEffect, useState } from "react"; -import {Platform, StyleSheet, Text, useColorScheme, View } from "react-native"; +import React, {FC} from "react"; +import {Platform, StyleSheet, Text, View } from "react-native"; import Modal from "react-native-modal/dist/modal"; import Icon from 'react-native-vector-icons/Feather'; -import { Colors } from "react-native/Libraries/NewAppScreen"; import Button from "./components/Button"; type NFCModalProps = { @@ -12,11 +11,10 @@ type NFCModalProps = { const NFCModal: FC = props => { const {isVisible, onChangeFunc} = props; - const isDarkMode = useColorScheme() === 'dark'; return ( - + Ready to Scan @@ -30,7 +28,7 @@ const NFCModal: FC = props => { const modalStyle = StyleSheet.create({ modalContainer: { justifyContent: 'flex-end', - margin: 0 + margin: 0, }, container: { height: 350, @@ -39,6 +37,7 @@ const modalStyle = StyleSheet.create({ borderTopLeftRadius: 10, borderTopRightRadius: 10, borderColor: 'rgba(0, 0, 0, 0.1)', + backgroundColor: '#222222' }, header: { paddingTop: '7%', diff --git a/src/components/Dialpad.tsx b/src/components/Dialpad.tsx index 1a482fc..96b452d 100644 --- a/src/components/Dialpad.tsx +++ b/src/components/Dialpad.tsx @@ -1,11 +1,10 @@ -import { SafeAreaView, StyleSheet, Text, View, Dimensions, useColorScheme } from "react-native"; +import { SafeAreaView, StyleSheet, Text, View, Dimensions } from "react-native"; import React, {FC, useState } from "react"; import DialpadKeypad from "./DialpadKeypad"; import Button from "./Button"; import DialpadPin from "./DialpadPin"; -import { Colors } from "react-native/Libraries/NewAppScreen"; - const { width, height } = Dimensions.get("window"); + const { width } = Dimensions.get("window"); type DialpadProps = { prompt: string; @@ -14,7 +13,6 @@ import { Colors } from "react-native/Libraries/NewAppScreen"; }; const Dialpad: FC = props => { - const isDarkMode = useColorScheme() === 'dark'; const {prompt, onNextFunc, onCancelFunc} = props; const dialPadContent = [1, 2, 3, 4, 5, 6, 7, 8, 9, "", 0, "X"]; const dialPadSize = width * 0.2; @@ -42,7 +40,7 @@ const Dialpad: FC = props => { } return ( - + {prompt} Enter your secure six-digit code @@ -58,8 +56,8 @@ const Dialpad: FC = props => { const styles = StyleSheet.create({ container: { - backgroundColor: "#4A646C55", - height: '100%' + backgroundColor: "#222222", + height: '100%', }, textContainer: { justifyContent: "center", diff --git a/src/components/PinInput.tsx b/src/components/PinInput.tsx deleted file mode 100644 index e69de29..0000000 diff --git a/src/components/steps/AuthenticationScreen.tsx b/src/components/steps/AuthenticationScreen.tsx index 5dcd99c..1451d6c 100644 --- a/src/components/steps/AuthenticationScreen.tsx +++ b/src/components/steps/AuthenticationScreen.tsx @@ -14,7 +14,8 @@ const AuthenticationScreen: FC = props => { Success - + Work in progress... + )}; @@ -22,7 +23,17 @@ const AuthenticationScreen: FC = props => { const styles = StyleSheet.create({ heading: { textAlign: 'center', - fontSize: 16 + fontSize: 30, + fontFamily: 'Inconsolata Medium', + color: '#199515', + marginTop: '50%' + }, + prompt: { + textAlign: 'center', + fontSize: 18, + fontFamily: 'Inconsolata Regular', + color: 'white', + marginTop: '5%' } }); diff --git a/src/components/steps/MnemonicScreen.tsx b/src/components/steps/MnemonicScreen.tsx index 7fff1df..d51575a 100644 --- a/src/components/steps/MnemonicScreen.tsx +++ b/src/components/steps/MnemonicScreen.tsx @@ -18,7 +18,6 @@ type MnemonicScreenProps = { const MnemonicScreen: FC = props => { const {pinRequired, onPressFunc, onCancelFunc} = props; const [mnemonic, setMnemonic] = useState(''); - const [pin, setPin] = useState(''); const [errMessage, setErrMessage] = useState(''); const [step, setStep] = useState(LoadMnemonicSteps.InsertMnemonic); @@ -52,12 +51,16 @@ const MnemonicScreen: FC = props => { return ( { step == LoadMnemonicSteps.InsertMnemonic && - + Load mnemonic - setMnemonic(val)} value={mnemonic} style={{backgroundColor: '#4A646C'}} /> - - - {errMessage} + + setMnemonic(val)} value={mnemonic} style={styles.mnemonic} placeholder="Type your passphrase"/> + + + + + + {errMessage} } { step == LoadMnemonicSteps.InsertPin && setStep(LoadMnemonicSteps.InsertMnemonic)} onNextFunc={submitPin}>} @@ -65,9 +68,43 @@ const MnemonicScreen: FC = props => { )}; const styles = StyleSheet.create({ + container: { + width: '89%', + marginLeft: '5.5%', + marginRight: '5.5%' + }, heading: { textAlign: 'center', + marginTop: 30, + fontSize: 28, + fontFamily: 'Inconsolata Medium', + color: "white", + paddingBottom: 20 + }, + mnemonicContainer: { + width: '100%', + height: 300, + borderColor: '#199515', + borderBottomWidth: 1, + borderTopWidth: 1, + borderStyle: 'dashed' + }, + mnemonic: { + textAlignVertical: 'bottom', + fontFamily: 'Inconsolata Regular', fontSize: 16 + }, + btnContainer: { + flexDirection: 'row', + width: '90%', + marginLeft: '5%', + marginRight: '5%', + alignItems: 'center' + }, + errorMessage: { + fontFamily: 'Inconsolata Regular', + textAlign: 'center', + paddingTop: '10%' } });