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
8394afe2
Commit
8394afe2
authored
Aug 15, 2019
by
Tonk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update add timer, delete FAB,
parent
ff9c98ea
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
52 deletions
+26
-52
screens/Private/TimerScreen/TimerScreen.js
+26
-52
No files found.
screens/Private/TimerScreen/TimerScreen.js
View file @
8394afe2
...
@@ -131,24 +131,7 @@ export default class TimerScreen extends Component {
...
@@ -131,24 +131,7 @@ export default class TimerScreen extends Component {
<
HeaderItem
title
=
"menu"
iconName
=
"ios-menu"
onPress
=
{()
=>
console
.
log
(
'menu'
)}
/
>
<
HeaderItem
title
=
"menu"
iconName
=
"ios-menu"
onPress
=
{()
=>
console
.
log
(
'menu'
)}
/
>
<
/HeaderButtons
>
<
/HeaderButtons
>
),
),
headerRight
:
(
headerRight
:
navigation
.
state
.
params
?
navigation
.
state
.
params
.
headerRight
:
null
,
<
TouchableOpacity
onPress
=
{()
=>
console
.
log
(
'clicked'
)}
>
<
View
style
=
{{
marginRight
:
17
}}
>
<
Icon
name
=
"ios-notifications"
style
=
{{
color
:
color
.
white
}}
/
>
<
Badge
badgeStyle
=
{{
width
:
12
,
height
:
12
,
borderWidth
:
2
,
borderRadius
:
6
,
backgroundColor
:
color
.
warnning
,
borderColor
:
color
.
primary
,
}}
containerStyle
=
{{
position
:
'absolute'
,
top
:
-
2
,
right
:
-
4
}}
/
>
<
/View
>
<
/TouchableOpacity
>
),
});
});
state
=
{
state
=
{
...
@@ -171,23 +154,24 @@ export default class TimerScreen extends Component {
...
@@ -171,23 +154,24 @@ export default class TimerScreen extends Component {
search
:
''
,
search
:
''
,
test
:
new
Animated
.
Value
(
height
*
1
),
test
:
new
Animated
.
Value
(
height
*
1
),
};
};
componentDidMount
()
{
renderTimerFab
=
()
=>
{
this
.
props
.
navigation
.
setParams
({
return
(
headerRight
:
(
<
Fab
<
TouchableOpacity
containerStyle
=
{{
onPress
=
{()
=>
bottom
:
'15%'
,
this
.
setState
({
// right: '50%', // centerFAB
isVisible
:
true
,
// marginRight: -28,
})
}}
}
style
=
{{
backgroundColor
:
color
.
primary
}}
position
=
"bottomRight"
onPress
=
{()
=>
this
.
setState
({
isVisible
:
true
})}
>
>
<
Icon
name
=
"add"
/>
<
View
style
=
{{
marginRight
:
17
}}
>
<
/Fab
>
<
Icon
name
=
"ios-add"
style
=
{{
color
:
color
.
white
}}
/
>
);
<
/View
>
};
<
/TouchableOpacity
>
),
});
}
autoClose
=
swipeInstance
=>
{
autoClose
=
swipeInstance
=>
{
if
(
this
.
currentlyOpenSwipe
&&
this
.
currentlyOpenSwipe
!==
swipeInstance
)
{
if
(
this
.
currentlyOpenSwipe
&&
this
.
currentlyOpenSwipe
!==
swipeInstance
)
{
this
.
currentlyOpenSwipe
.
close
();
this
.
currentlyOpenSwipe
.
close
();
...
@@ -229,19 +213,8 @@ export default class TimerScreen extends Component {
...
@@ -229,19 +213,8 @@ export default class TimerScreen extends Component {
};
};
onOpenModal
=
()
=>
{
onOpenModal
=
()
=>
{
this
.
setState
({
this
.
setState
({
filterOpen
:
true
,
isVisible
:
true
,
});
});
this
.
testslide
();
};
testslide
=
()
=>
{
Animated
.
timing
(
// Animate over time
this
.
state
.
test
,
// The animated value to drive
{
toValue
:
height
*
0.3
,
// Animate to opacity: 1 (opaque)
duration
:
500
,
// Make it take a while
}
).
start
();
};
};
render
()
{
render
()
{
return
(
return
(
...
@@ -287,7 +260,11 @@ export default class TimerScreen extends Component {
...
@@ -287,7 +260,11 @@ export default class TimerScreen extends Component {
<
Icon
<
Icon
name
=
"md-funnel"
name
=
"md-funnel"
style
=
{{
color
:
'#c7cad1'
,
fontSize
:
14
,
marginLeft
:
10
}}
style
=
{{
color
:
'#c7cad1'
,
fontSize
:
14
,
marginLeft
:
10
}}
onPress
=
{()
=>
this
.
onOpenModal
()}
onPress
=
{()
=>
this
.
setState
({
filterOpen
:
true
,
})
}
/
>
/
>
<
/View
>
<
/View
>
...
@@ -318,10 +295,9 @@ export default class TimerScreen extends Component {
...
@@ -318,10 +295,9 @@ export default class TimerScreen extends Component {
<
FadeDimBG
/>
<
FadeDimBG
/>
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'transparent'
}}
>
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'transparent'
}}
>
<
SlideUpModal
ending
=
{
0.1
}
style
=
{
styles
.
scrollContainer
}
>
<
SlideUpModal
ending
=
{
0.1
}
style
=
{
styles
.
scrollContainer
}
>
<
ScrollView
>
<
Text
style
=
{
theme
.
title
}
>
Create
Timer
<
/Text
>
<
Text
style
=
{
theme
.
title
}
>
Create
Timer
<
/Text
>
<
ScrollView
style
=
{
theme
.
mt2
}
>
<
Text
style
=
{[
theme
.
normalText
,
theme
.
textDark
,
theme
.
mt2
]}
>
Set
Time
<
/Text
>
<
Text
style
=
{[
theme
.
normalText
,
theme
.
textDark
]}
>
Set
Time
<
/Text
>
<
DatePicker
<
DatePicker
date
=
{
this
.
state
.
timer
}
date
=
{
this
.
state
.
timer
}
onDateChange
=
{
date
=>
this
.
setState
({
timer
:
date
})}
onDateChange
=
{
date
=>
this
.
setState
({
timer
:
date
})}
...
@@ -501,7 +477,6 @@ export default class TimerScreen extends Component {
...
@@ -501,7 +477,6 @@ export default class TimerScreen extends Component {
<
/SlideUpModal
>
<
/SlideUpModal
>
<
/View
>
<
/View
>
<
/Modal
>
<
/Modal
>
{
this
.
renderTimerFab
()}
{
/* Filter Modal */
}
{
/* Filter Modal */
}
<
Modal
<
Modal
...
@@ -601,7 +576,6 @@ export default class TimerScreen extends Component {
...
@@ -601,7 +576,6 @@ export default class TimerScreen extends Component {
<
/SlideUpModal
>
<
/SlideUpModal
>
<
/View
>
<
/View
>
<
/Modal
>
<
/Modal
>
{
/* {this.renderTimerFab()} */
}
<
/
>
<
/
>
);
);
}
}
...
...
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