From a60c53220761c685531b759abd714af5340d87dc Mon Sep 17 00:00:00 2001 From: Severyn Date: Sat, 7 Aug 2021 16:30:55 -0400 Subject: [PATCH] Fixed #16, #17, #20, #21, #22, #23 --- App.tsx | 12 ++-- Navigator.tsx | 68 +++++++++++++------ package.json | 1 + src/assets/svg/PullDown.svg | 3 + .../CreateAccountWidget.tsx | 4 +- src/components/CreateAccountWIdget/Style.ts | 2 +- src/components/CustomButton/Style.ts | 3 +- src/components/CustomButton/index.tsx | 47 ++++++++----- .../CustomWidgets/DoneModalview.tsx | 2 +- src/components/SignKey/Style.ts | 2 +- src/views/Connect/Connect.tsx | 2 +- src/views/Friends/Friends.tsx | 23 ++++++- src/views/Login/Login.tsx | 10 ++- src/views/MyAccount/Overview.tsx | 26 +++++++ src/views/MyAccount/Style.ts | 7 ++ src/views/SendCoins1/SendCoins1.tsx | 12 ++-- src/views/Settings/Settings.tsx | 16 +++++ src/views/Transactions/Transactions.tsx | 30 ++++++-- 18 files changed, 205 insertions(+), 65 deletions(-) create mode 100644 src/assets/svg/PullDown.svg diff --git a/App.tsx b/App.tsx index bedd7d7a..75660cdc 100644 --- a/App.tsx +++ b/App.tsx @@ -1,18 +1,18 @@ -import * as React from "react"; +import React, { useEffect, useState } from "react"; import { Provider } from 'react-redux' import Navigator from "./Navigator"; import { PersistGate } from 'redux-persist/integration/react'; import configureStore from './src/store/store'; import { persistStore, persistReducer } from 'redux-persist'; -const store = configureStore(); -//const prefix = Linking.createURL('/'); -const persistor = persistStore(store); +const store = configureStore(); +const persistor = persistStore(store); + +const App = (props) => { -const App = (props) => { return ( - + ) diff --git a/Navigator.tsx b/Navigator.tsx index 8a289b7e..3b3026c3 100644 --- a/Navigator.tsx +++ b/Navigator.tsx @@ -30,8 +30,9 @@ import ScanCode from "assets/svg/ScanCode.svg"; import TNBLogo from "assets/svg/TNBLogo.svg"; -const Navigator = ({route}) => { +const Navigator = ({route, isLogin}) => { const Stack = createStackNavigator(); + return ( { > - qrCodeHeaderOptions("", navigation) } - /> + />} { @@ -78,13 +79,13 @@ const Navigator = ({route}) => { const TabIcon = ({ icon, text, focused }) => { return ( - + {icon} {text} @@ -94,15 +95,15 @@ const TabIcon = ({ icon, text, focused }) => { }; const TabNavigator = ({route}) => { - const Tab = createBottomTabNavigator(); + const Tab = createBottomTabNavigator(); return ( ( { /> - stackheaderOptions("Send Coins", navigation) + stackSendCoinheaderOptions("Send Coins", navigation) } name="sendcoins1" initialParams={{validator_accounts: route.params.validator_accounts, bank_url: route.params.bank_url}} @@ -206,7 +207,7 @@ const OverviewStackScreen = ({route}) => { /> - stackheaderOptions("Send Coins", navigation) + stackSendCoinheaderOptions("Send Coins", navigation) } name="sendcoins2" component={SendCoins2Screen} @@ -251,11 +252,11 @@ const qrCodeHeaderOptions = (title, navigation) => { shadowOpacity: 0, }, headerTitle: title, - headerRight: () => ( - - - - ), + // headerRight: () => ( + // + // + // + // ), headerLeft: () => , }; }; @@ -295,7 +296,7 @@ const headerOptions = { shadowOpacity: 0, }, headerTitle: "", - headerLeft: () => null, + headerLeft: () => null, }; @@ -315,6 +316,29 @@ const stackheaderOptions = (title, navigation) => { }; }; +const stackSendCoinheaderOptions = (title, navigation) => { + return { + headerStyle: { + elevation: 0, + shadowOpacity: 0, + backgroundColor: "transparent", + }, + headerLeft: () => ( + navigation.goBack(null)}> + + + ), + headerRight: () => ( + + + + ), + headerTitle: () => {title}, + }; +}; + + + const tabStyle = { position: "absolute", bottom: 25, @@ -323,9 +347,11 @@ const tabStyle = { elevation: 0, borderRadius: 16, height: 65, - backgroundColor: "#2B4150", - borderWidth: 0, - borderColor: "#62737E", + backgroundColor: "linear-gradient(20.23deg, rgba(53, 96, 104, 0.6) -4.86%, rgba(29, 39, 49, 0.6) 110.32%)", + //borderWidth: 0, + borderColor: "#62737E", + // borderTopColor: 'red', + // borderTopWidth: 1, }; const headingStyle = { diff --git a/package.json b/package.json index 136515f3..9248639c 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "react-native-spinkit": "^1.5.1", "react-native-svg": "^12.1.1", "react-native-svg-transformer": "^0.14.3", + "react-native-swipe-gestures": "^1.0.5", "react-native-tweetnacl": "^1.0.5", "react-native-uuid": "^2.0.1", "react-native-vector-icons": "^8.1.0", diff --git a/src/assets/svg/PullDown.svg b/src/assets/svg/PullDown.svg new file mode 100644 index 00000000..3aaca1ca --- /dev/null +++ b/src/assets/svg/PullDown.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/CreateAccountWIdget/CreateAccountWidget.tsx b/src/components/CreateAccountWIdget/CreateAccountWidget.tsx index 3de21801..7b95b790 100644 --- a/src/components/CreateAccountWIdget/CreateAccountWidget.tsx +++ b/src/components/CreateAccountWIdget/CreateAccountWidget.tsx @@ -11,7 +11,7 @@ import { BlurView, VibrancyView } from "@react-native-community/blur"; import LinearGradient from 'react-native-linear-gradient'; import {Account} from 'thenewboston/dist/index.js' import { SigningKeyAction, AccountNumberAction } from '../../actions/loginActions'; -import { useSelector, useDispatch} from 'react-redux'; +import { useSelector, useDispatch} from 'react-redux'; interface createAccount { title: string, @@ -83,7 +83,7 @@ const CreateAccountWidget = (props: createAccount) => { return ( - + {props.title} diff --git a/src/components/CreateAccountWIdget/Style.ts b/src/components/CreateAccountWIdget/Style.ts index 1e3f836a..e02c159c 100644 --- a/src/components/CreateAccountWIdget/Style.ts +++ b/src/components/CreateAccountWIdget/Style.ts @@ -8,7 +8,7 @@ const Styles = StyleSheet.create({ paddingVertical: "5%", }, formView: { - marginTop: "5%", + marginTop: "4%", alignItems: "center", width:"100%", }, diff --git a/src/components/CustomButton/Style.ts b/src/components/CustomButton/Style.ts index c1168112..2f017ca0 100644 --- a/src/components/CustomButton/Style.ts +++ b/src/components/CustomButton/Style.ts @@ -10,7 +10,8 @@ const Styles = StyleSheet.create({ justifyContent: "center", marginTop: 25, marginBottom: 30, - borderRadius: 12, + borderRadius: 12, + }, containerStyle:{ width:'100%', diff --git a/src/components/CustomButton/index.tsx b/src/components/CustomButton/index.tsx index 749985ec..1e7f2f4c 100644 --- a/src/components/CustomButton/index.tsx +++ b/src/components/CustomButton/index.tsx @@ -2,7 +2,8 @@ import { Button } from "react-native-elements"; import { Colors } from "../../styles"; import React from "react"; import Style from "./Style"; -import { View } from "react-native"; +import { View, Text} from "react-native"; +import { TouchableOpacity } from "react-native-gesture-handler"; type SelectProps = { title: any; @@ -30,23 +31,33 @@ const CustomButton = ({ loading, ...rest }: SelectProps) => ( -