Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
safetcut-app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
atichat
safetcut-app
Commits
9e4e07b1
Commit
9e4e07b1
authored
Oct 01, 2019
by
Tonk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
501e0996
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
30 deletions
+39
-30
screens/Private/ProfileScreen/ProfileScreen.js
+25
-19
screens/Private/SmartMeterScreen/McbLinkScreen.js
+5
-4
screens/Private/SmartMeterScreen/McbLinkSettingScreen.js
+5
-4
screens/Private/SmartMeterScreen/SmartMeterDetailScreen.js
+4
-1
screens/Private/SmartMeterScreen/SmartMeterScreen.js
+0
-2
No files found.
screens/Private/ProfileScreen/ProfileScreen.js
View file @
9e4e07b1
import
React
from
'react'
;
import
{
Text
,
Card
,
Icon
,
Button
,
ActionSheet
}
from
'native-base'
;
import
{
View
,
StyleSheet
,
TouchableOpacity
}
from
'react-native'
;
import
{
View
,
StyleSheet
,
TouchableOpacity
,
ScrollView
}
from
'react-native'
;
import
{
HeaderButtons
,
Item
}
from
'react-navigation-header-buttons'
;
import
IoniconsHeaderButton
from
'../../../components/IoniconsHeaderButton'
;
import
{
theme
,
color
}
from
'../../../constants/Styles'
;
...
...
@@ -48,23 +48,30 @@ class ProfileScreen extends React.Component {
)}
<
/Card
>
<
/View
>
<
View
style
=
{
styles
.
infoContainer
}
>
<
Text
style
=
{
theme
.
description
}
>
Name
<
/Text
>
<
Text
style
=
{
styles
.
textInfo
}
>
{
displayName
||
'-'
}
<
/Text
>
<
View
style
=
{
styles
.
seperator
}
/
>
<
Text
style
=
{
theme
.
description
}
>
Email
<
/Text
>
<
Text
style
=
{
styles
.
textInfo
}
>
{
email
||
'-'
}
<
/Text
>
<
View
style
=
{
styles
.
seperator
}
/
>
<
Text
style
=
{
theme
.
description
}
>
Phone
No
.
<
/Text
>
<
Text
style
=
{
styles
.
textInfo
}
>
{
phoneNumber
||
'-'
}
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{[
styles
.
infoContainer
,
theme
.
mt2
,
theme
.
rowContainer
,
{
justifyContent
:
'space-between'
}]}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'ChangePassword'
)}
>
<
Text
style
=
{[
styles
.
textInfo
,
{
marginTop
:
0
}]}
>
Change
Password
<
/Text
>
<
Icon
name
=
"chevron-thin-right"
type
=
"Entypo"
style
=
{{
fontSize
:
20
,
color
:
color
.
grey
}}
/
>
<
/TouchableOpacity
>
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
style
=
{{
marginVertical
:
80
}}
>
<
View
style
=
{
styles
.
infoContainer
}
>
<
Text
style
=
{
theme
.
description
}
>
Name
<
/Text
>
<
Text
style
=
{
styles
.
textInfo
}
>
{
displayName
||
'-'
}
<
/Text
>
<
View
style
=
{
styles
.
seperator
}
/
>
<
Text
style
=
{
theme
.
description
}
>
Email
<
/Text
>
<
Text
style
=
{
styles
.
textInfo
}
>
{
email
||
'-'
}
<
/Text
>
<
View
style
=
{
styles
.
seperator
}
/
>
<
Text
style
=
{
theme
.
description
}
>
Phone
No
.
<
/Text
>
<
Text
style
=
{
styles
.
textInfo
}
>
{
phoneNumber
||
'-'
}
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{[
styles
.
infoContainer
,
theme
.
mt2
,
theme
.
rowContainer
,
{
justifyContent
:
'space-between'
},
]}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'ChangePassword'
)}
>
<
Text
style
=
{[
styles
.
textInfo
,
{
marginTop
:
0
}]}
>
Change
Password
<
/Text
>
<
Icon
name
=
"chevron-thin-right"
type
=
"Entypo"
style
=
{{
fontSize
:
20
,
color
:
color
.
grey
}}
/
>
<
/TouchableOpacity
>
<
/ScrollView
>
<
Button
full
rounded
...
...
@@ -110,7 +117,6 @@ const styles = StyleSheet.create({
},
infoContainer
:
{
backgroundColor
:
color
.
white
,
marginTop
:
80
,
padding
:
20
,
},
textInfo
:
{
...
...
screens/Private/SmartMeterScreen/McbLinkScreen.js
View file @
9e4e07b1
...
...
@@ -312,9 +312,7 @@ class McbLinkScreen extends React.Component {
>
<
Text
style
=
{[
theme
.
description
,
{
color
:
color
.
white
}]}
>
Done
<
/Text
>
<
/TouchableOpacity
>
)
:
(
<
Text
style
=
{
theme
.
description
}
>
Edit
<
/Text
>
)}
)
:
null
}
<
/View
>
<
View
>
<
ScrollView
horizontal
pagingEnabled
showsHorizontalScrollIndicator
=
{
false
}
>
...
...
@@ -373,7 +371,7 @@ class McbLinkScreen extends React.Component {
numColumns
=
{
4
}
renderItem
=
{({
item
,
index
})
=>
{
if
(
item
.
type
===
'empty'
)
{
return
<
View
style
=
{{
flex
:
1
,
margin
:
10
}}
/>
;
return
<
View
style
=
{{
flex
:
1
}}
/>
;
}
else
{
const
dynamicColor
=
item
.
type
===
deviceType
?
color
.
white
:
color
.
primary
;
return
(
...
...
@@ -383,6 +381,9 @@ class McbLinkScreen extends React.Component {
{
backgroundColor
:
item
.
type
===
deviceType
?
color
.
primary
:
color
.
white
,
marginVertical
:
10
,
marginRight
:
(
index
+
1
)
%
4
?
10
:
0
,
marginLeft
:
0
,
},
]}
>
...
...
screens/Private/SmartMeterScreen/McbLinkSettingScreen.js
View file @
9e4e07b1
...
...
@@ -4,7 +4,7 @@ import { Text, Icon } from 'native-base';
import
{
HeaderButtons
,
Item
}
from
'react-navigation-header-buttons'
;
import
IoniconsHeaderButton
from
'../../../components/IoniconsHeaderButton'
;
import
{
theme
,
color
}
from
'../../../constants/Styles'
;
import
{
TouchableOpacity
,
FlatList
}
from
'react-native-gesture-handler'
;
import
{
TouchableOpacity
,
FlatList
,
ScrollView
}
from
'react-native-gesture-handler'
;
import
{
connect
}
from
'react-redux'
;
class
McbLinkSettingScreen
extends
React
.
Component
{
...
...
@@ -56,15 +56,16 @@ class McbLinkSettingScreen extends React.Component {
render
()
{
const
{
mcbLinkInfo
,
subBreakerInfo
}
=
this
.
state
;
return
(
<
View
style
=
{
theme
.
container
}
>
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
style
=
{
theme
.
container
}
>
<
View
style
=
{
theme
.
mt2
}
>
{
this
.
renderList
(
mcbLinkInfo
)}
<
/View
>
<
FlatList
scrollEnabled
=
{
false
}
data
=
{
subBreakerInfo
}
renderItem
=
{({
item
,
index
})
=>
this
.
renderList
(
item
,
index
)}
ItemSeparatorComponent
=
{()
=>
<
View
style
=
{
styles
.
seperator
}
/>
}
contentContainerStyle
=
{
theme
.
mt2
}
contentContainerStyle
=
{
{
marginVertical
:
20
}
}
/
>
<
/View
>
<
/
Scroll
View
>
);
}
}
...
...
screens/Private/SmartMeterScreen/SmartMeterDetailScreen.js
View file @
9e4e07b1
...
...
@@ -213,7 +213,10 @@ class SmartMeterDetailScreen extends Component {
index
%
3
===
0
?
{
marginRight
:
0
}
:
{
marginLeft
:
10
},
]}
>
<
Text
style
=
{[
theme
.
description
,
{
color
:
item
.
value
>
item
.
limit
?
color
.
white
:
color
.
grey
}]}
>
<
Text
numberOfLines
=
{
1
}
style
=
{[
theme
.
description
,
{
color
:
item
.
value
>
item
.
limit
?
color
.
white
:
color
.
grey
}]}
>
{
item
.
name
}
<
/Text
>
<
Text
...
...
screens/Private/SmartMeterScreen/SmartMeterScreen.js
View file @
9e4e07b1
...
...
@@ -88,8 +88,6 @@ class SmartMeterScreen extends PureComponent {
return
(
<
View
style
=
{[
theme
.
container
]}
>
<
View
style
=
{
theme
.
containerWithPadding
}
>
<
Text
style
=
{[
theme
.
smallTitle
,
theme
.
textDark
,
{
marginBottom
:
10
}]}
>
Smart
Device
<
/Text
>
<
SearchBar
containerStyle
=
{
styles
.
searchBarContainer
}
inputContainerStyle
=
{
styles
.
searchBarInputContainer
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment