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
78369df1
Commit
78369df1
authored
Aug 26, 2019
by
Tonk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
9c6f7442
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
12 deletions
+34
-12
screens/Private/NotificationScreen/NotificationScreen.js
+16
-5
screens/Private/SettingScreen/SettingScreen.js
+8
-1
screens/Private/SmartMeterScreen/SmartMeterDetailScreen.js
+5
-3
screens/Private/TimerScreen/TimerScreen.ios.js
+5
-3
No files found.
screens/Private/NotificationScreen/NotificationScreen.js
View file @
78369df1
...
...
@@ -20,7 +20,7 @@ export default class NotificationScreen extends React.Component {
static
navigationOptions
=
({
navigation
})
=>
({
title
:
'Notifications'
,
headerLeft
:
(
<
TouchableOpacity
onPress
=
{()
=>
console
.
log
(
'Home'
)}
>
<
TouchableOpacity
onPress
=
{()
=>
navigation
.
navigate
(
'Home'
)}
>
<
View
style
=
{{
marginLeft
:
17
}}
>
<
Icon
name
=
"home"
type
=
"SimpleLineIcons"
style
=
{{
color
:
color
.
white
,
fontSize
:
16
}}
/
>
<
/View
>
...
...
@@ -211,12 +211,16 @@ export default class NotificationScreen extends React.Component {
});
let
view
=
[];
let
day
;
if
(
data
.
length
===
0
)
{
view
.
push
(
<
Text
style
=
{[
theme
.
normalText
,
{
paddingHorizontal
:
30
,
paddingVertical
:
10
}]}
>
No
data
<
/Text>
)
;
}
else
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
isToday
(
data
[
i
].
time
*
1000
)
&&
i
===
0
)
{
view
.
push
(
<>
<
Text
style
=
{[
theme
.
normalText
,
{
paddingHorizontal
:
30
,
paddingVertical
:
10
}]}
>
Today
<
/Text
>
<
Text
style
=
{[
theme
.
normalText
,
{
paddingHorizontal
:
30
,
paddingVertical
:
10
}]}
>
Today
<
/Text
>
{
this
.
renderActionCard
(
data
[
i
])}
<
/
>
);
...
...
@@ -228,7 +232,9 @@ export default class NotificationScreen extends React.Component {
view
.
push
(
<>
<
Text
style
=
{[
theme
.
normalText
,
{
paddingHorizontal
:
30
,
paddingVertical
:
10
}]}
>
{
isYesterday
(
data
[
i
].
time
*
1000
)
?
'Yesterday'
:
format
(
data
[
i
].
time
*
1000
,
'DD/MM/YYYY'
)}
{
isYesterday
(
data
[
i
].
time
*
1000
)
?
'Yesterday'
:
format
(
data
[
i
].
time
*
1000
,
'DD/MM/YYYY'
)}
<
/Text
>
{
this
.
renderActionCard
(
data
[
i
])}
<
/
>
...
...
@@ -236,6 +242,7 @@ export default class NotificationScreen extends React.Component {
day
=
data
[
i
].
time
*
1000
;
}
}
}
return
view
;
}
...
...
@@ -361,6 +368,7 @@ export default class NotificationScreen extends React.Component {
<
/Text
>
<
/View
>
<
Text
style
=
{[
theme
.
smallTitle
,
theme
.
textDanger
,
theme
.
mt2
]}
>
Select
Date
<
/Text
>
<
ScrollView
>
<
View
style
=
{[
theme
.
mt2
,
styles
.
pickerContainer
]}
>
<
RNPickerSelect
onValueChange
=
{
value
=>
this
.
setState
({
filterBy
:
value
})}
...
...
@@ -377,10 +385,13 @@ export default class NotificationScreen extends React.Component {
useNativeAndroidPickerStyle
=
{
false
}
value
=
{
this
.
state
.
filterBy
}
style
=
{
pickerStyle
}
Icon
=
{()
=>
<
Icon
name
=
"ios-arrow-down"
style
=
{{
fontSize
:
14
,
color
:
'#c8c8c8'
}}
/>
}
Icon
=
{()
=>
(
<
Icon
name
=
"ios-arrow-down"
style
=
{{
fontSize
:
14
,
color
:
'#c8c8c8'
}}
/
>
)}
/
>
<
/View
>
{
this
.
state
.
filterBy
===
'custom'
&&
this
.
renderCalendar
()}
<
/ScrollView
>
<
/SlideUpModal
>
<
/Modal
>
...
...
screens/Private/SettingScreen/SettingScreen.js
View file @
78369df1
...
...
@@ -9,6 +9,13 @@ import { TouchableHighlight } from 'react-native-gesture-handler';
class
SettingScreen
extends
React
.
Component
{
static
navigationOptions
=
({
navigation
})
=>
({
title
:
'Setting'
,
headerLeft
:
(
<
TouchableOpacity
onPress
=
{()
=>
navigation
.
navigate
(
'Home'
)}
>
<
View
style
=
{{
marginLeft
:
17
}}
>
<
Icon
name
=
"home"
type
=
"SimpleLineIcons"
style
=
{{
color
:
color
.
white
,
fontSize
:
16
}}
/
>
<
/View
>
<
/TouchableOpacity
>
),
headerRight
:
navigation
.
state
.
params
?
navigation
.
state
.
params
.
headerRight
:
null
,
});
constructor
(
props
)
{
...
...
@@ -39,7 +46,7 @@ class SettingScreen extends React.Component {
return
(
<
View
style
=
{[
theme
.
container
]}
>
<
Text
style
=
{[
theme
.
description
,
theme
.
mt2
,
{
marginLeft
:
25
,
color
:
'#a8a8a8'
}]}
>
{
data
.
type
.
toUpperCase
()
}
{
/* {data.type.toUpperCase()} */
}
<
/Text
>
<
List
style
=
{
styles
.
ListItemContainer
}
>
...
...
screens/Private/SmartMeterScreen/SmartMeterDetailScreen.js
View file @
78369df1
...
...
@@ -91,9 +91,11 @@ class SmartMeterDetailScreen extends Component {
return
{
title
:
deviceName
,
headerLeft
:
(
<
HeaderButtons
HeaderButtonComponent
=
{
IoniconsHeaderButton
}
>
<
Item
title
=
"back"
iconName
=
"ios-arrow-back"
onPress
=
{()
=>
navigation
.
popToTop
()}
/
>
<
/HeaderButtons
>
<
TouchableOpacity
onPress
=
{()
=>
navigation
.
navigate
(
'Home'
)}
>
<
View
style
=
{{
marginLeft
:
17
}}
>
<
Icon
name
=
"home"
type
=
"SimpleLineIcons"
style
=
{{
color
:
color
.
white
,
fontSize
:
16
}}
/
>
<
/View
>
<
/TouchableOpacity
>
),
headerRight
:
(
<
TouchableOpacity
onPress
=
{()
=>
console
.
log
(
'clicked'
)}
>
...
...
screens/Private/TimerScreen/TimerScreen.ios.js
View file @
78369df1
...
...
@@ -162,9 +162,11 @@ class TimerScreen extends Component {
static
navigationOptions
=
({
navigation
})
=>
({
title
:
'Timer'
,
headerLeft
:
(
<
HeaderButtons
HeaderButtonComponent
=
{
IoniconsHeaderButton
}
>
<
HeaderItem
title
=
"menu"
iconName
=
"ios-menu"
onPress
=
{()
=>
console
.
log
(
'menu'
)}
/
>
<
/HeaderButtons
>
<
TouchableOpacity
onPress
=
{()
=>
navigation
.
navigate
(
'Home'
)}
>
<
View
style
=
{{
marginLeft
:
17
}}
>
<
Icon
name
=
"home"
type
=
"SimpleLineIcons"
style
=
{{
color
:
color
.
white
,
fontSize
:
16
}}
/
>
<
/View
>
<
/TouchableOpacity
>
),
headerRight
:
navigation
.
state
.
params
?
navigation
.
state
.
params
.
headerRight
:
null
,
});
...
...
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