From d6bd93c26a79d3723c0ce1df8ce112b7e03d73c6 Mon Sep 17 00:00:00 2001 From: Mustafa Buyukcelebi Date: Tue, 29 Oct 2019 17:35:45 +0300 Subject: [PATCH 1/2] Fixed login input and pincode dark design --- .../formInput/view/formInputStyles.js | 2 +- .../formInput/view/formInputView.js | 33 +++++++++++-------- .../views/numericKeyboardStyles.js | 2 +- .../views/pinAnimatedInputView.js | 4 +-- src/screens/login/screen/loginScreen.js | 2 ++ src/screens/login/screen/loginStyles.js | 3 ++ 6 files changed, 29 insertions(+), 17 deletions(-) diff --git a/src/components/formInput/view/formInputStyles.js b/src/components/formInput/view/formInputStyles.js index a82adbd9f..3c46154da 100644 --- a/src/components/formInput/view/formInputStyles.js +++ b/src/components/formInput/view/formInputStyles.js @@ -6,7 +6,7 @@ export default EStyleSheet.create({ borderTopRightRadius: 8, marginTop: 16, flexDirection: 'row', - backgroundColor: '$primaryGray', + backgroundColor: '$primaryLightBackground', height: 60, borderBottomWidth: 2, }, diff --git a/src/components/formInput/view/formInputView.js b/src/components/formInput/view/formInputView.js index 6e4b46d16..d2551da77 100644 --- a/src/components/formInput/view/formInputView.js +++ b/src/components/formInput/view/formInputView.js @@ -5,6 +5,7 @@ import FastImage from 'react-native-fast-image'; // Components import { TextInput } from '../../textInput'; import { Icon } from '../../icon'; +import { ThemeContainer } from '../../../containers'; // Utils import { getResizedAvatar } from '../../../utils/image'; @@ -68,6 +69,7 @@ class FormInputView extends Component { height, inputStyle, } = this.props; + return ( - this.setState({ inputBorderColor: '#357ce6' })} - onBlur={() => this.setState({ inputBorderColor: '#e7e7e7' })} - autoCapitalize="none" - secureTextEntry={secureTextEntry} - height={height} - placeholder={placeholder} - editable={isEditable || true} - textContentType={type} - onChangeText={this._handleOnChange} - value={value} - /> + + {({ isDarkTheme }) => ( + this.setState({ inputBorderColor: '#357ce6' })} + onBlur={() => this.setState({ inputBorderColor: '#e7e7e7' })} + autoCapitalize="none" + secureTextEntry={secureTextEntry} + height={height} + placeholder={placeholder} + editable={isEditable || true} + textContentType={type} + onChangeText={this._handleOnChange} + value={value} + placeholderTextColor={isDarkTheme ? '#526d91' : '#788187'} + /> + )} + {value && value.length > 0 ? ( diff --git a/src/components/numericKeyboard/views/numericKeyboardStyles.js b/src/components/numericKeyboard/views/numericKeyboardStyles.js index 5294a32cd..329ed9b16 100644 --- a/src/components/numericKeyboard/views/numericKeyboardStyles.js +++ b/src/components/numericKeyboard/views/numericKeyboardStyles.js @@ -24,7 +24,7 @@ export default EStyleSheet.create({ }, buttonWithoutBorder: { borderWidth: 0, - backgroundColor: '$primaryWhiteLightBackground', + backgroundColor: 'transparent', width: '$deviceWidth / 7', height: '$deviceWidth / 7', alignItems: 'center', diff --git a/src/components/pinAnimatedInput/views/pinAnimatedInputView.js b/src/components/pinAnimatedInput/views/pinAnimatedInputView.js index 3b555e3e9..77dc98e9f 100644 --- a/src/components/pinAnimatedInput/views/pinAnimatedInputView.js +++ b/src/components/pinAnimatedInput/views/pinAnimatedInputView.js @@ -1,10 +1,10 @@ -import React, { PureComponent } from 'react'; +import React, { Component } from 'react'; import { Animated, Easing, View } from 'react-native'; // Styles import styles from './pinAnimatedInputStyles'; -class PinAnimatedInput extends PureComponent { +class PinAnimatedInput extends Component { /* Props * * @prop { string } pin - Description. diff --git a/src/screens/login/screen/loginScreen.js b/src/screens/login/screen/loginScreen.js index f466ad59f..8e01f5cd6 100644 --- a/src/screens/login/screen/loginScreen.js +++ b/src/screens/login/screen/loginScreen.js @@ -119,6 +119,7 @@ class LoginScreen extends PureComponent { type="username" isFirstImage value={username} + inputStyle={styles.input} /> Date: Wed, 30 Oct 2019 11:56:41 +0300 Subject: [PATCH 2/2] Added time for voters page item --- src/components/votersDisplay/view/votersDisplayView.js | 2 +- src/utils/postParser.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/votersDisplay/view/votersDisplayView.js b/src/components/votersDisplay/view/votersDisplayView.js index dff5406a6..258fb7825 100644 --- a/src/components/votersDisplay/view/votersDisplayView.js +++ b/src/components/votersDisplay/view/votersDisplayView.js @@ -31,7 +31,7 @@ const VotersDisplayView = ({ votes, navigation }) => { const _renderItem = (item, index) => { const value = `$ ${item.value}`; const percent = `${item.percent}%`; - console.log(item); + return ( { if (!post) { return null; } - + const activeVotes = await getActiveVotes(get(post, 'author'), get(post, 'permlink')); if (currentUserName === post.author) { post.markdownBody = post.body; } post.is_promoted = isPromoted; post.json_metadata = JSON.parse(post.json_metadata); post.image = postImage(post.json_metadata, post.body); + post.active_votes = activeVotes; post.vote_count = post.active_votes.length; post.author_reputation = getReputation(post.author_reputation); post.avatar = getResizedAvatar(get(post, 'author'));