diff --git a/src/Main.tsx b/src/Main.tsx index 2f09304..fb655b3 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -14,6 +14,7 @@ import Keycard from "react-native-status-keycard"; import Dialpad from './components/Dialpad'; import { sha256 } from '@noble/hashes/sha256'; import { bytesToHex } from '@noble/hashes/utils'; +import Styles from './Styles'; enum Step { Discovery, @@ -277,7 +278,7 @@ const Main = () => { } return ( - + {step == Step.Discovery && } {step == Step.Initialization && } {step == Step.Loading && } @@ -289,13 +290,5 @@ const Main = () => { ); } -const styles = StyleSheet.create({ - container: { - backgroundColor: '#222222', - width: '100%', - height: '100%' - }, -}); - export default Main; diff --git a/src/NFCModal.tsx b/src/NFCModal.tsx index 21df18c..513c412 100644 --- a/src/NFCModal.tsx +++ b/src/NFCModal.tsx @@ -1,8 +1,9 @@ import React, {FC} from "react"; -import {Platform, StyleSheet, Text, View } from "react-native"; +import {Platform, Text, View } from "react-native"; import Modal from "react-native-modal/dist/modal"; import Icon from 'react-native-vector-icons/Feather'; import Button from "./components/Button"; +import Styles from "./Styles"; type NFCModalProps = { isVisible: boolean; @@ -13,55 +14,16 @@ const NFCModal: FC = props => { const {isVisible, onChangeFunc} = props; return ( - - - Ready to Scan - - + + + Ready to Scan + + - Tap your Keycard - + Tap your Keycard + )}; -const modalStyle = StyleSheet.create({ - modalContainer: { - justifyContent: 'flex-end', - margin: 0, - }, - container: { - height: 350, - paddingBottom: 20, - alignItems: 'center', - borderTopLeftRadius: 10, - borderTopRightRadius: 10, - borderColor: 'rgba(0, 0, 0, 0.1)', - backgroundColor: '#222222' - }, - header: { - paddingTop: '7%', - fontSize: 22, - fontFamily: 'Inter' - }, - prompt: { - paddingTop: '10%', - fontSize: 16, - fontFamily: 'Inter' - }, - iconContainer: { - width: 80, - height: 80, - alignItems: 'center', - justifyContent: 'center', - borderColor: '#0e4e0b', - borderWidth: 3, - borderRadius: 80, - marginTop: '7%', - }, - icon: { - color: '#0e4e0b' - } -}); - export default NFCModal; \ No newline at end of file diff --git a/src/ReceiveModal.tsx b/src/ReceiveModal.tsx index 226823e..7031a86 100644 --- a/src/ReceiveModal.tsx +++ b/src/ReceiveModal.tsx @@ -17,7 +17,7 @@ const ReceiveModal: FC = props => { - + )}; diff --git a/src/Styles.tsx b/src/Styles.tsx new file mode 100644 index 0000000..e1fe4cc --- /dev/null +++ b/src/Styles.tsx @@ -0,0 +1,101 @@ +import { StyleSheet } from "react-native"; + +const Styles = StyleSheet.create({ + container: { + backgroundColor: 'black', + width: '100%', + height: '100%' + }, + textContainer: { + width: '100%', + paddingTop: 80, + }, + heading: { + color: 'white', + textAlign: 'center', + fontSize: 32, + fontFamily: 'Inter', + lineHeight: 40, + }, + subtitle: { + textAlign: 'center', + paddingTop: 20, + color: 'white', + fontSize: 18, + lineHeight: 24, + width: '60%', + marginLeft: '20%', + marginRight: '20%' + }, + multipassImg: { + width: '80%', + height: '38%', + resizeMode: 'contain', + marginLeft: '10%', + marginRight: '10%', + marginTop: 80 + }, + footer: { + width: '100%', + position: 'absolute', + bottom: 60, + justifyContent: 'center' + }, + sublinkContainer: { + alignItems: 'center', + flexDirection: 'row', + justifyContent: 'center', + paddingTop: 20 + }, + sublinkText: { + color: 'white', + fontSize: 12, + fontFamily: 'Inter' + }, + sublinkAction: { + color: 'white', + fontSize: 12, + fontFamily: 'Inter', + textDecorationLine: 'underline' + }, + + modalContainer: { + justifyContent: 'flex-end', + margin: 0, + }, + modalContent: { + height: 350, + paddingBottom: 20, + alignItems: 'center', + borderTopLeftRadius: 10, + borderTopRightRadius: 10, + borderColor: 'rgba(0, 0, 0, 0.1)', + backgroundColor: '#470644' + }, + modalHeader: { + paddingTop: '7%', + fontSize: 20, + fontFamily: 'Inter' + }, + modalPrompt: { + paddingTop: '10%', + fontSize: 16, + fontFamily: 'Inter', + paddingBottom: 30 + }, + modalIconContainer: { + width: 80, + height: 80, + alignItems: 'center', + justifyContent: 'center', + borderColor: '#F29AE9', + borderWidth: 3, + borderRadius: 80, + marginTop: '7%', + }, + modalIcon: { + color: '#F29AE9' + } +}); + +export default Styles \ No newline at end of file diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 3eaa7bd..4a1ffd2 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -4,22 +4,16 @@ import { DimensionValue, StyleSheet, Text, TouchableOpacity, View } from "react- type ButtonProps = { label: string; disabled: boolean; - btnColor: string; - btnWidth: string; - btnFontSize?: number; - btnBorderColor?: string; - btnBorderWidth?: number; - btnJustifyContent: string; onChangeFunc: () => void; }; const Button: FC = props => { - const {label, disabled, btnColor, btnWidth, btnJustifyContent, btnFontSize, btnBorderWidth, btnBorderColor, onChangeFunc} = props; + const {label, disabled, onChangeFunc} = props; return ( - + - {label} + {label} )}; @@ -28,16 +22,20 @@ const buttonStyle = StyleSheet.create({ textBtnContainer: { flexDirection: 'row', textAlign: 'center', - paddingTop: 25, - paddingBottom: 15, - justifyContent: 'flex-start', + justifyContent: 'center', + backgroundColor: 'white', + width: '90%', + marginLeft: '5%', + marginRight: '5%', + paddingTop: 15, + paddingBottom: 15 }, button: { }, title: { - color: "white", - textTransform: 'uppercase', + color: "black", fontFamily: 'Inter', + fontSize: 14 }, }); diff --git a/src/components/Dialpad.tsx b/src/components/Dialpad.tsx index ab49aa8..370dfe0 100644 --- a/src/components/Dialpad.tsx +++ b/src/components/Dialpad.tsx @@ -51,8 +51,8 @@ const Dialpad: FC = props => { - - + + )}; diff --git a/src/components/steps/DiscoveryScreen.tsx b/src/components/steps/DiscoveryScreen.tsx index 0c977e9..a09a4ff 100644 --- a/src/components/steps/DiscoveryScreen.tsx +++ b/src/components/steps/DiscoveryScreen.tsx @@ -1,6 +1,7 @@ import {FC } from "react"; -import { StyleSheet, Text, View } from "react-native"; +import { Image, Linking, Text, TouchableOpacity, View } from "react-native"; import Button from "../Button"; +import Styles from "../../Styles"; type DiscoveryScreenProps = { onPressFunc: () => void; @@ -11,39 +12,24 @@ const DiscoveryScreen: FC = props => { const {onPressFunc, onFactoryResetFunc} = props; return ( - - - We are recruiting Operators to be the founders of a new, self-sovereign world in cyberspace + + + Welcome, Operator! + Let's start by connecting your Multipass - - - + + + + + Don’t have Multipass? Find out how to get one + Linking.openURL('https://keycard.tech')}> + here + + )}; -const styles = StyleSheet.create({ - container: { - width: '100%', - height: '100%' - }, - headingContainer: { - width: '100%', - paddingLeft: '5.5%', - paddingRight: '5.5%', - paddingTop: '50%', - }, - heading: { - color: 'white', - textAlign: 'center', - fontSize: 18, - fontFamily: 'Inter' - }, - btnContainer: { - paddingTop: '7%' - } -}); - export default DiscoveryScreen; \ No newline at end of file diff --git a/src/components/steps/FactoryResetScreen.tsx b/src/components/steps/FactoryResetScreen.tsx index 5013d7a..3c37f10 100644 --- a/src/components/steps/FactoryResetScreen.tsx +++ b/src/components/steps/FactoryResetScreen.tsx @@ -16,8 +16,8 @@ const FactoryResetScreen: FC = props => { Factory reset This will remove the keys from your card. Are you sure? - - + + )}; diff --git a/src/components/steps/HomeScreen.tsx b/src/components/steps/HomeScreen.tsx index 1de80e8..e7c7b5b 100644 --- a/src/components/steps/HomeScreen.tsx +++ b/src/components/steps/HomeScreen.tsx @@ -91,9 +91,9 @@ const HomeScreen: FC = props => { return {step == HomeSteps.Home && - - - + + + {setReceiveVisible(false)} } /> } diff --git a/src/components/steps/MnemonicScreen.tsx b/src/components/steps/MnemonicScreen.tsx index 58407df..e8b4d54 100644 --- a/src/components/steps/MnemonicScreen.tsx +++ b/src/components/steps/MnemonicScreen.tsx @@ -66,9 +66,9 @@ const MnemonicScreen: FC = props => { { step == LoadMnemonicSteps.Home && Load card - - - + + + } { step == LoadMnemonicSteps.InsertMnemonic && @@ -78,8 +78,8 @@ const MnemonicScreen: FC = props => { setMnemonic(val)} value={mnemonic} style={styles.mnemonic} placeholder="Type your passphrase"/> - - + + {errMessage} @@ -87,8 +87,8 @@ const MnemonicScreen: FC = props => { { step == LoadMnemonicSteps.CreateMnemonic && {mnemonic} - - + + } { step == LoadMnemonicSteps.InsertPin && setStep(LoadMnemonicSteps.InsertMnemonic)} onNextFunc={submitPin}>} diff --git a/src/images/multipass.png b/src/images/multipass.png new file mode 100644 index 0000000..d2c21e7 Binary files /dev/null and b/src/images/multipass.png differ