diff --git a/src/components/dropdownButton/view/dropdownButtonStyles.js b/src/components/dropdownButton/view/dropdownButtonStyles.js index 9498b1778..d56412777 100644 --- a/src/components/dropdownButton/view/dropdownButtonStyles.js +++ b/src/components/dropdownButton/view/dropdownButtonStyles.js @@ -23,6 +23,8 @@ export default EStyleSheet.create({ dropdown: { marginTop: 5, marginLeft: -2, + paddingTop: 10, + paddingBottom: 10, minWidth: "$deviceWidth / 2", borderColor: "#e7e7e7", borderRadius: 5, @@ -67,7 +69,7 @@ export default EStyleSheet.create({ highlightedRow: { borderRadius: 20, height: 35, - backgroundColor: "#387BE5", + backgroundColor: "$primaryBlue", marginLeft: 5, width: "$deviceWidth / 3.2", }, diff --git a/src/components/dropdownButton/view/dropdownButtonView.js b/src/components/dropdownButton/view/dropdownButtonView.js index 27d902fac..fa5369218 100644 --- a/src/components/dropdownButton/view/dropdownButtonView.js +++ b/src/components/dropdownButton/view/dropdownButtonView.js @@ -54,10 +54,7 @@ const DropdownButtonView = ({ this.setState({ - inputBorderColor: "#357ce6", + inputBorderColor: "$primaryBlue", }) } onSubmitEditing={() => diff --git a/src/components/mainButton/view/mainButtonStyles.js b/src/components/mainButton/view/mainButtonStyles.js index bf61f952d..4eee0e5f5 100644 --- a/src/components/mainButton/view/mainButtonStyles.js +++ b/src/components/mainButton/view/mainButtonStyles.js @@ -7,7 +7,7 @@ export default EStyleSheet.create({ minWidth: 56, height: 56, borderRadius: 30, - backgroundColor: "#357ce6", + backgroundColor: "$primaryBlue", flexDirection: "row", margin: 5, shadowOffset: { diff --git a/src/index.js b/src/index.js index fcba62b6e..27b7fb81b 100755 --- a/src/index.js +++ b/src/index.js @@ -6,42 +6,42 @@ import { StatusBar, Dimensions } from "react-native"; import EStyleSheet from "react-native-extended-stylesheet"; EStyleSheet.build({ - // Primary Colors - $white: "#FFFFFF", - $black: "#000000", - $primaryBlue: "#357ce6", - $primaryGray: "#788187", - $primaryLightGray: "#f6f6f6", - $primaryRed: "#e63535", + // Primary Colors + $white: "#FFFFFF", + $black: "#000000", + $primaryBlue: "#357ce6", + $primaryGray: "#788187", + $primaryLightGray: "#f6f6f6", + $primaryRed: "#e63535", - // General Colors - $borderColor: "#ffff", - $bubblesBlue: "#5CCDFF", - $iconColor: "#c1c5c7", - $dangerColor: "#fff", - $warningColor: "#fff", - $successColor: "#fff", - $disableButton: "#fff", - $shadowColor: "#fff", - $disableGray: "#fff", + // General Colors + $borderColor: "#ffff", + $bubblesBlue: "#5CCDFF", + $iconColor: "#c1c5c7", + $dangerColor: "#fff", + $warningColor: "#fff", + $successColor: "#fff", + $disableButton: "#fff", + $shadowColor: "#fff", + $disableGray: "#fff", - // Devices Sizes - $deviceHeight: Dimensions.get("window").height, - $deviceWidth: Dimensions.get("window").width, + // Devices Sizes + $deviceHeight: Dimensions.get("window").height, + $deviceWidth: Dimensions.get("window").width, - // Fonts Properties - $primaryFont: "Roboto", - $primaryLatterSpacing: 0, + // Fonts Properties + $primaryFont: "Roboto", + $primaryLatterSpacing: 0, }); registerScreens(); Navigation.events().registerAppLaunchedListener(() => { - Navigation.setRoot({ - root: { - component: { - name: "navigation.eSteem.Splash", - }, - }, - }); + Navigation.setRoot({ + root: { + component: { + name: "navigation.eSteem.Splash", + }, + }, + }); }); diff --git a/src/screens/home/home.js b/src/screens/home/home.js index 4eb55b61e..86a7c7434 100644 --- a/src/screens/home/home.js +++ b/src/screens/home/home.js @@ -26,198 +26,198 @@ import FeedPage from "./feed"; import TrendingPage from "./trending"; export default class Home extends React.PureComponent { - static get options() { - return { - _statusBar: { - visible: true, - drawBehind: false, - }, - topBar: { - animate: true, - hideOnScroll: true, - drawBehind: false, - noBorder: true, - elevation: 0, - }, - layout: { - backgroundColor: "#f5fcff", - }, - bottomTabs: { - visible: true, - drawBehind: true, - }, - }; - } - constructor(props) { - super(props); - Navigation.events().bindComponent(this); // <== Will be automatically unregistered when unmounted - this.state = { - user: { - name: "null", - }, - isLoggedIn: false, - isLoading: true, - category: "HOT", - options: ["HOT", "TRENDING", "CLOSE"], - }; - } - - navigationButtonPressed({ buttonId }) { - if (buttonId === "search") { - Navigation.showOverlay({ - component: { - name: "navigation.eSteem.Search", - }, - options: { - overlay: { - interceptTouchOutside: true, - }, - }, - }); - } - } - - showActionSheet = () => { - this.ActionSheet.show(); + static get options() { + return { + _statusBar: { + visible: true, + drawBehind: false, + }, + topBar: { + animate: true, + hideOnScroll: true, + drawBehind: false, + noBorder: true, + elevation: 0, + }, + layout: { + backgroundColor: "#f5fcff", + }, + bottomTabs: { + visible: true, + drawBehind: true, + }, }; + } + constructor(props) { + super(props); + Navigation.events().bindComponent(this); // <== Will be automatically unregistered when unmounted + this.state = { + user: { + name: "null", + }, + isLoggedIn: false, + isLoading: true, + category: "HOT", + options: ["HOT", "TRENDING", "CLOSE"], + }; + } - async componentDidMount() { - let user; - let userData; - let isLoggedIn; - - await getAuthStatus().then(res => { - isLoggedIn = res; - }); - - if (isLoggedIn == true) { - await getUserData().then(res => { - user = Array.from(res); - }); - userData = await getUser(user[0].username); - - this.setState({ - user: userData, - isLoggedIn: isLoggedIn, - isLoading: false, - }); - } else { - await this.setState({ - isLoading: false, - }); - } + navigationButtonPressed({ buttonId }) { + if (buttonId === "search") { + Navigation.showOverlay({ + component: { + name: "navigation.eSteem.Search", + }, + options: { + overlay: { + interceptTouchOutside: true, + }, + }, + }); } + } - render() { - return ( - - ( - - )} - > - - {this.state.isLoggedIn ? ( - - ) : ( - Login to see your Feed - )} - - - - - - - - - - - ); + showActionSheet = () => { + this.ActionSheet.show(); + }; + + async componentDidMount() { + let user; + let userData; + let isLoggedIn; + + await getAuthStatus().then(res => { + isLoggedIn = res; + }); + + if (isLoggedIn == true) { + await getUserData().then(res => { + user = Array.from(res); + }); + userData = await getUser(user[0].username); + + this.setState({ + user: userData, + isLoggedIn: isLoggedIn, + isLoading: false, + }); + } else { + await this.setState({ + isLoading: false, + }); } + } + + render() { + return ( + + ( + + )} + > + + {this.state.isLoggedIn ? ( + + ) : ( + Login to see your Feed + )} + + + + + + + + + + + ); + } } const styles = { - root: { - justifyContent: "center", - alignItems: "center", - flex: 1, - }, - buttonContainer: { - width: "50%", - alignItems: "center", - }, - tabView: { - alignSelf: "center", - backgroundColor: "transparent", - }, - tabbar: { - alignSelf: "center", - height: 40, - backgroundColor: "white", - }, - tabbarItem: { - flex: 1, - paddingHorizontal: 7, - backgroundColor: "#f9f9f9", - minWidth: Dimensions.get("window").width, - }, - container: { - backgroundColor: "#F9F9F9", - flex: 1, - }, - tabs: { - flex: 1, - }, - placeholder: { - backgroundColor: "white", - padding: 20, - borderStyle: "solid", - borderWidth: 1, - borderTopWidth: 1, - borderColor: "#e2e5e8", - borderRadius: 5, - marginRight: 0, - marginLeft: 0, - marginTop: 10, - }, - header: { - backgroundColor: "#284b78", - borderBottomWidth: 0, - borderColor: "#284b78", - }, - avatar: { - width: 30, - height: 30, - borderRadius: 15, - borderWidth: 1, - borderColor: "white", - }, - searchButton: { - color: "white", - fontWeight: "bold", - }, - loginButton: { - alignSelf: "center", - marginTop: 100, - }, + root: { + justifyContent: "center", + alignItems: "center", + flex: 1, + }, + buttonContainer: { + width: "50%", + alignItems: "center", + }, + tabView: { + alignSelf: "center", + backgroundColor: "transparent", + }, + tabbar: { + alignSelf: "center", + height: 40, + backgroundColor: "white", + }, + tabbarItem: { + flex: 1, + paddingHorizontal: 7, + backgroundColor: "#f9f9f9", + minWidth: Dimensions.get("window").width, + }, + container: { + backgroundColor: "#F9F9F9", + flex: 1, + }, + tabs: { + flex: 1, + }, + placeholder: { + backgroundColor: "white", + padding: 20, + borderStyle: "solid", + borderWidth: 1, + borderTopWidth: 1, + borderColor: "#e2e5e8", + borderRadius: 5, + marginRight: 0, + marginLeft: 0, + marginTop: 10, + }, + header: { + backgroundColor: "#284b78", + borderBottomWidth: 0, + borderColor: "#284b78", + }, + avatar: { + width: 30, + height: 30, + borderRadius: 15, + borderWidth: 1, + borderColor: "white", + }, + searchButton: { + color: "white", + fontWeight: "bold", + }, + loginButton: { + alignSelf: "center", + marginTop: 100, + }, }; diff --git a/src/screens/login/screen/loginScreen.js b/src/screens/login/screen/loginScreen.js index 09a23c5e3..5ba1f3bbe 100644 --- a/src/screens/login/screen/loginScreen.js +++ b/src/screens/login/screen/loginScreen.js @@ -131,7 +131,7 @@ class LoginScreen extends Component { style={styles.tabbar} tabUnderlineDefaultWidth={100} // default containerWidth / (numberOfTabs * 4) tabUnderlineScaleX={2} // default 3 - activeColor={"#357ce6"} + activeColor={"$primaryBlue"} inactiveColor={"#222"} /> )} diff --git a/src/screens/notification/screen/notificationScreen.js b/src/screens/notification/screen/notificationScreen.js index bd2191c48..83c2b1fdd 100644 --- a/src/screens/notification/screen/notificationScreen.js +++ b/src/screens/notification/screen/notificationScreen.js @@ -17,7 +17,7 @@ class NotificationScreen extends React.Component { style={styles.tabbar} tabUnderlineDefaultWidth={100} tabUnderlineScaleX={2} - activeColor={"#357ce6"} + activeColor={"$primaryBlue"} inactiveColor={"#222"} /> )} diff --git a/src/styles/pinCode.styles.js b/src/styles/pinCode.styles.js index 2abfdda9f..5e1dc0d6e 100644 --- a/src/styles/pinCode.styles.js +++ b/src/styles/pinCode.styles.js @@ -1,32 +1,32 @@ import EStyleSheet from "react-native-extended-stylesheet"; export default EStyleSheet.create({ - title: { - color: "#357ce6", - fontSize: 20, - fontWeight: "bold", - marginTop: 25, - alignSelf: "center", - marginBottom: 25, - }, - logo: { - marginTop: "$deviceHeight / 8", - }, - forgotButtonText: { - color: "#788187", - fontSize: 14, - marginTop: 25, - alignSelf: "center", - marginBottom: 25, - }, - input: { - backgroundColor: "#f5f5f5", - borderColor: "#fff", - borderRadius: 5, - paddingLeft: 15, - minWidth: "$deviceWidth / 2", - }, - icon: { - color: "#357ce6", - }, + title: { + color: "$primaryBlue", + fontSize: 20, + fontWeight: "bold", + marginTop: 25, + alignSelf: "center", + marginBottom: 25, + }, + logo: { + marginTop: "$deviceHeight / 8", + }, + forgotButtonText: { + color: "#788187", + fontSize: 14, + marginTop: 25, + alignSelf: "center", + marginBottom: 25, + }, + input: { + backgroundColor: "#f5f5f5", + borderColor: "#fff", + borderRadius: 5, + paddingLeft: 15, + minWidth: "$deviceWidth / 2", + }, + icon: { + color: "$primaryBlue", + }, });