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
777f8030
Commit
777f8030
authored
Aug 16, 2019
by
Tonk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update font size, add setting screen, delete unused from timer
parent
fa114a6e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
31 deletions
+98
-31
AppNavigation.js
+10
-9
constants/Styles.js
+3
-3
screens/Private/SettingScreen/SettingScreen.js
+85
-0
screens/Private/TimerScreen/TimerScreen.js
+0
-19
No files found.
AppNavigation.js
View file @
777f8030
...
...
@@ -18,9 +18,11 @@ import CameraScreen from './screens/Private/CameraScreen';
// Timer
import
TimerScreen
from
'./screens/Private/TimerScreen/TimerScreen'
;
// Setting
import
SettingScreen
from
'./screens/Private/SettingScreen/SettingScreen'
;
import
PageTwo
from
'./screens/Private/PageTwo'
;
import
PageTree
from
'./screens/Private/PageTree'
;
import
PageFour
from
'./screens/Private/PageFour'
;
import
AuthLoadingScreen
from
'./screens/Public/AuthLoadingScreen'
;
...
...
@@ -38,7 +40,7 @@ const defaultNavigationOptions = {
},
headerTintColor
:
'#fff'
,
headerTitleStyle
:
{
font
Weight
:
'bold'
,
font
Size
:
18
,
fontFamily
:
'Avenir-Roman'
,
},
};
...
...
@@ -97,10 +99,9 @@ const ThirdStack = createStackNavigator(
defaultNavigationOptions
,
}
);
const
FourthStack
=
createStackNavigator
(
const
SettingStack
=
createStackNavigator
(
{
Four
:
PageFour
,
Setting
:
SettingScreen
,
},
{
headerLayoutPreset
:
'center'
,
...
...
@@ -115,7 +116,7 @@ const BottomNavigationTabs = props => {
};
const
BottomTabs
=
[
{
label
:
'
Smart Meter
'
,
icon
:
{
name
:
'home'
}
},
{
label
:
'
Device
'
,
icon
:
{
name
:
'home'
}
},
{
label
:
'Timer'
,
icon
:
{
name
:
'md-time'
}
},
{
label
:
'History'
,
icon
:
{
type
:
'SimpleLineIcons'
,
name
:
'chart'
}
},
{
label
:
'Share'
,
icon
:
{
name
:
'ios-share-alt'
}
},
...
...
@@ -157,8 +158,8 @@ const BottomNavigationTabs = props => {
title
=
{
tab
.
label
}
titleStyle
=
{{
fontFamily
:
'Avenir-Roman'
,
fontSize
:
1
1
,
fontWeight
:
'
5
00'
,
fontSize
:
1
2
,
fontWeight
:
'
3
00'
,
marginVertical
:
0
,
marginBottom
:
2
,
}}
...
...
@@ -191,7 +192,7 @@ const WithBottomTabStack = createBottomTabNavigator(
Timer
:
TimerStack
,
Two
:
SecondStack
,
Tree
:
ThirdStack
,
Four
:
Fourth
Stack
,
Setting
:
Setting
Stack
,
},
{
initialRouteName
:
'Timer'
,
// default SmartMeter
...
...
constants/Styles.js
View file @
777f8030
...
...
@@ -55,17 +55,17 @@ export const theme = StyleSheet.create({
fontFamily
:
'Avenir-Roman'
,
},
normalText
:
{
fontSize
:
1
5
,
fontSize
:
1
6
,
fontFamily
:
'Avenir-Roman'
,
color
:
color
.
grey
,
},
description
:
{
fontSize
:
1
2
,
fontSize
:
1
4
,
fontFamily
:
'Avenir-Roman'
,
color
:
color
.
grey
,
},
smDescription
:
{
fontSize
:
1
0
,
fontSize
:
1
2
,
fontFamily
:
'Avenir-Roman'
,
color
:
color
.
grey
,
},
...
...
screens/Private/SettingScreen/SettingScreen.js
0 → 100644
View file @
777f8030
import
React
from
'react'
;
import
{
View
,
StyleSheet
}
from
'react-native'
;
import
{
ListItem
,
Body
,
Text
,
Icon
,
Right
,
Switch
,
List
}
from
'native-base'
;
import
{
theme
,
color
}
from
'../../../constants/Styles'
;
const
data
=
{
breaker
:
'Main Breaker'
,
name
:
'Main Breaker'
,
description
:
'Lorem ipsum dolorsit amet,consectetur adipiscing elit. Cras sagitti.'
,
rcbo
:
10
,
notification
:
true
,
};
export
default
class
SettingScreen
extends
React
.
Component
{
static
navigationOptions
=
({
navigation
})
=>
({
title
:
'Setting'
,
});
render
()
{
return
(
<
View
style
=
{[
theme
.
container
]}
>
<
List
style
=
{
styles
.
ListItemContainer
}
>
<
ListItem
itemDivider
>
<
Body
>
<
Text
style
=
{
theme
.
description
}
>
{
data
.
breaker
.
toUpperCase
()}
<
/Text
>
<
/Body
>
<
/ListItem
>
<
ListItem
>
<
Body
>
<
Text
style
=
{[
theme
.
normalText
,
theme
.
textDark
]}
>
Name
<
/Text
>
<
Text
note
numberOfLines
=
{
1
}
style
=
{
theme
.
description
}
>
{
data
.
name
}
<
/Text
>
<
/Body
>
<
Right
>
<
Icon
name
=
"arrow-forward"
/>
<
/Right
>
<
/ListItem
>
<
ListItem
>
<
Body
>
<
Text
style
=
{[
theme
.
normalText
,
theme
.
textDark
]}
>
Description
<
/Text
>
<
Text
note
numberOfLines
=
{
2
}
style
=
{
theme
.
description
}
>
{
data
.
description
}
<
/Text
>
<
/Body
>
<
Right
>
<
Icon
name
=
"arrow-forward"
/>
<
/Right
>
<
/ListItem
>
<
ListItem
>
<
Body
>
<
Text
style
=
{[
theme
.
normalText
,
theme
.
textDark
]}
>
RCBO
<
/Text
>
<
Text
note
numberOfLines
=
{
1
}
style
=
{
theme
.
description
}
>
{
data
.
rcbo
}
mA
<
/Text
>
<
/Body
>
<
Right
>
<
Icon
name
=
"arrow-forward"
/>
<
/Right
>
<
/ListItem
>
<
ListItem
>
<
Body
>
<
Text
style
=
{[
theme
.
normalText
,
theme
.
textDark
]}
>
Notification
<
/Text
>
<
/Body
>
<
Right
>
<
Switch
value
=
{
data
.
notification
}
/
>
<
/Right
>
<
/ListItem
>
<
/List
>
<
List
style
=
{
styles
.
ListItemContainer
}
>
<
ListItem
>
<
Body
>
<
Text
style
=
{[
theme
.
normalText
,
theme
.
textDanger
]}
>
Delete
<
/Text
>
<
/Body
>
<
/ListItem
>
<
/List
>
<
/View
>
);
}
}
const
styles
=
StyleSheet
.
create
({
ListItemContainer
:
{
backgroundColor
:
color
.
white
,
marginTop
:
20
,
},
});
screens/Private/TimerScreen/TimerScreen.js
View file @
777f8030
...
...
@@ -201,7 +201,6 @@ class TimerScreen extends Component {
isfilterVisible
:
false
,
search
:
''
,
// test: new Animated.Value(height * 1),
};
// renderTimerFab = () => {
...
...
@@ -263,26 +262,9 @@ class TimerScreen extends Component {
prevProps
!==
this
.
props
&&
console
.
log
(
this
.
props
);
};
// onOpenModal = () => {
// this.setState({
// isfilterVisible: true,
// });
// };
render
()
{
return
(
<>
{
/* Overlay */
}
{
/* <Modal
transparent
presentationStyle={'overFullScreen'}
animationType="fade"
visible={this.state.isfilerVisible || this.state.isAddVisible}
>
<View style={{ width, height, backgroundColor: 'rgba(0,0,0,0.5)' }} />
</Modal> */
}
{
/* Search Bar */
}
<
View
style
=
{{
padding
:
15
,
flexDirection
:
'row'
,
alignItems
:
'center'
}}
>
<
SearchBar
...
...
@@ -311,7 +293,6 @@ class TimerScreen extends Component {
<
Text
style
=
{[
theme
.
normalText
,
theme
.
mt2
]}
>
No
Subbreaker
<
/Text
>
<
/View
>
)}
// ListFooterComponent={() => item.timer.length > 0 && <View style={styles.separator} />}
ItemSeparatorComponent
=
{()
=>
<
View
style
=
{
styles
.
separator
}
/>
}
renderItem
=
{({
item
,
index
})
=>
(
<
SwipeableRow
item
=
{
item
}
index
=
{
index
}
onSwipeOpen
=
{
this
.
autoCloseSwipeRow
}
/
>
...
...
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