aboutsummaryrefslogtreecommitdiff
path: root/src/View
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-03-16 22:19:06 +0100
committerJoris Guyonvarch2015-03-16 22:19:06 +0100
commite1f8664779b0075ad7da76e4290c1fe8f9b76b94 (patch)
treea77a661296dee9276c63a7d8f1609d0629018108 /src/View
parent8060fc370a8e16c7f39b1f63c6dc9127073eb5fe (diff)
Adding a play / pause button
Diffstat (limited to 'src/View')
-rw-r--r--src/View/Timer.elm13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/View/Timer.elm b/src/View/Timer.elm
index 5d34c7e..e38b6cb 100644
--- a/src/View/Timer.elm
+++ b/src/View/Timer.elm
@@ -20,9 +20,7 @@ timerView (id, timer) =
div
[ class <| "timer" ++ (if timer.isRunning then " isRunning" else "") ]
[ button
- [ class "name block"
- , onClick (Signal.send updates (UpdateTimer id ToggleRunning))
- ]
+ [ class "name block" ]
[ text timer.name ]
, div
[ class <| "time block" ]
@@ -33,6 +31,15 @@ timerView (id, timer) =
]
[ i [ class "fa fa-fw fa-backward" ] [] ]
, button
+ [ class <| "playPause block"
+ , onClick (Signal.send updates (UpdateTimer id ToggleRunning))
+ ]
+ [ let icon = if timer.isRunning then "fa-pause" else "fa-play"
+ in i
+ [ class <| "fa fa-fw " ++ icon ]
+ []
+ ]
+ , button
[ class <| "stop block"
, onClick (Signal.send updates (UpdateTimer id Stop))
]