Commit 8b082b3a by Tonk

update

parent 77afa811
...@@ -3,6 +3,7 @@ import { Field, reduxForm } from 'redux-form'; ...@@ -3,6 +3,7 @@ import { Field, reduxForm } from 'redux-form';
import Input from './Input'; import Input from './Input';
import GradientBtn from '../GradientBtn'; import GradientBtn from '../GradientBtn';
import { theme } from '../../constants/Styles'; import { theme } from '../../constants/Styles';
import { View } from 'react-native';
// validation // validation
const required = value => (value ? undefined : 'This is a required field.'); const required = value => (value ? undefined : 'This is a required field.');
...@@ -17,7 +18,7 @@ const email = value => ...@@ -17,7 +18,7 @@ const email = value =>
class ForgotPassword extends Component { class ForgotPassword extends Component {
render() { render() {
return ( return (
<> <View style={theme.mt1}>
<Field <Field
forwardRef forwardRef
ref={c => (this.email = c)} ref={c => (this.email = c)}
...@@ -27,10 +28,9 @@ class ForgotPassword extends Component { ...@@ -27,10 +28,9 @@ class ForgotPassword extends Component {
component={Input} component={Input}
validate={[required, email]} validate={[required, email]}
placeholder="E-mail" placeholder="E-mail"
style={theme.containerWithVerticalMargin}
/> />
<GradientBtn onPress={this.props.handleSubmit} title={'send'} /> <GradientBtn onPress={this.props.handleSubmit} title={'send'} />
</> </View>
); );
} }
} }
......
...@@ -33,12 +33,12 @@ const MeterCard = ({ item, onPressEachCard, data, isFocused, ...rest }) => { ...@@ -33,12 +33,12 @@ const MeterCard = ({ item, onPressEachCard, data, isFocused, ...rest }) => {
const renderContent = () => ( const renderContent = () => (
<> <>
<View {/* <View
style={[ style={[
styles.meterOn, styles.meterOn,
{ backgroundColor: breakerStatus === 1 ? 'rgba(65, 204, 0, 0.59)' : 'rgba(223, 0, 0, 0.59)' }, { backgroundColor: breakerStatus === 1 ? 'rgba(65, 204, 0, 0.59)' : 'rgba(223, 0, 0, 0.59)' },
]} ]}
/> /> */}
{/* <View style={[styles.meterOnInner, { backgroundColor: breakerStatus === 1 ? 'rgba(65, 204, 0, 0.2)' : 'rgba(223, 0, 0, 0.2)'}]} /> */} {/* <View style={[styles.meterOnInner, { backgroundColor: breakerStatus === 1 ? 'rgba(65, 204, 0, 0.2)' : 'rgba(223, 0, 0, 0.2)'}]} /> */}
<View style={[theme.centerContainer, { paddingLeft: 10 }]}> <View style={[theme.centerContainer, { paddingLeft: 10 }]}>
{item.img ? ( {item.img ? (
......
...@@ -38,7 +38,7 @@ export const theme = StyleSheet.create({ ...@@ -38,7 +38,7 @@ export const theme = StyleSheet.create({
}, },
introContainer: { introContainer: {
top: '12%', top: '12%',
paddingHorizontal: 50, paddingHorizontal: 25,
}, },
flexContainer: { flexContainer: {
flex: 1, flex: 1,
......
...@@ -367,7 +367,7 @@ class McbLinkScreen extends React.Component { ...@@ -367,7 +367,7 @@ class McbLinkScreen extends React.Component {
<Text style={[theme.normalText]}>Select Devices icon</Text> <Text style={[theme.normalText]}>Select Devices icon</Text>
<FlatList <FlatList
data={formatGridData(listDeviceIcon)} data={formatGridData(listDeviceIcon)}
style={[theme.mt1, { paddingBottom: isIphoneX() ? 80 : 45 }]} style={[theme.mt1, { paddingBottom: isIphoneX() ? 80 : 45, paddingHorizontal: 1 }]}
numColumns={4} numColumns={4}
renderItem={({ item, index }) => { renderItem={({ item, index }) => {
if (item.type === 'empty') { if (item.type === 'empty') {
...@@ -381,7 +381,7 @@ class McbLinkScreen extends React.Component { ...@@ -381,7 +381,7 @@ class McbLinkScreen extends React.Component {
{ {
backgroundColor: backgroundColor:
item.type === deviceType ? color.primary : color.white, item.type === deviceType ? color.primary : color.white,
marginVertical: 10, marginVertical: 5,
marginRight: (index + 1) % 4 ? 10 : 0, marginRight: (index + 1) % 4 ? 10 : 0,
marginLeft: 0, marginLeft: 0,
}, },
......
...@@ -50,7 +50,13 @@ class McbLinkSettingScreen extends React.Component { ...@@ -50,7 +50,13 @@ class McbLinkSettingScreen extends React.Component {
style={styles.listContainer} style={styles.listContainer}
onPress={() => this.props.navigation.navigate('EditMcbLink', { item, mcbIndex, subIndex })} onPress={() => this.props.navigation.navigate('EditMcbLink', { item, mcbIndex, subIndex })}
> >
<View>
<Text style={[theme.smallTitle, theme.textDark]}>{item.name}</Text> <Text style={[theme.smallTitle, theme.textDark]}>{item.name}</Text>
{item.type === 'subBreaker' && (
<Text style={[theme.description]}>{`Sub Breaker ${subIndex + 1}`}</Text>
)}
</View>
<Icon name="chevron-thin-right" type="Entypo" style={styles.iconStyle} /> <Icon name="chevron-thin-right" type="Entypo" style={styles.iconStyle} />
</TouchableOpacity> </TouchableOpacity>
); );
......
...@@ -30,8 +30,10 @@ export default class ForgotPasswordScreen extends Component { ...@@ -30,8 +30,10 @@ export default class ForgotPasswordScreen extends Component {
<View style={theme.introContainer}> <View style={theme.introContainer}>
<Text style={[theme.title, theme.centerText]}>Forgot Password</Text> <Text style={[theme.title, theme.centerText]}>Forgot Password</Text>
<View style={{ marginTop: 40 }}> <View style={{ marginTop: 40 }}>
<Text style={theme.normalText}>Please enter your email address.</Text> <Text style={[theme.normalText, theme.centerText]}>Please enter your email address.</Text>
<Text style={theme.normalText}>You will receive a link to create a new password via email.</Text> <Text style={[theme.normalText, theme.centerText]}>
You will receive a link to create a new password via email.
</Text>
</View> </View>
<ForgotPasswordForm onSubmit={this.handleSubmit} /> <ForgotPasswordForm onSubmit={this.handleSubmit} />
</View> </View>
......
...@@ -58,11 +58,11 @@ class RegisterScreen extends Component { ...@@ -58,11 +58,11 @@ class RegisterScreen extends Component {
render() { render() {
return ( return (
<View style={[theme.flexContainer]}> <View style={[theme.flexContainer, theme.mt1]}>
<Text style={[theme.title, { paddingHorizontal: 50 }]}>Register</Text> <Text style={[theme.title, { paddingHorizontal: 25 }]}>Register</Text>
<ScrollView contentContainerStyle={{ paddingHorizontal: 50 }}> <ScrollView contentContainerStyle={{ paddingHorizontal: 25 }}>
<RegisterForm onSubmit={this.submit}> <RegisterForm onSubmit={this.submit}>
<View style={theme.rowContainer}> <View style={[theme.rowContainer, theme.mt1]}>
<CheckBox <CheckBox
color={color.grey} color={color.grey}
checked={this.state.isCheck} checked={this.state.isCheck}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment