diff options
author | Joris Guyonvarch | 2015-03-21 12:40:48 +0100 |
---|---|---|
committer | Joris Guyonvarch | 2015-03-21 12:40:48 +0100 |
commit | 29eac851219e36bccf2724b05d52b70438b5bf3f (patch) | |
tree | 1d6ab9f6e443301895a8277dfa170e039e844e6b /src/View/Timer.elm | |
parent | 9e6cf2f2f15b3fef1f99a2fcf980eb96945dc936 (diff) |
Removing restart button
Diffstat (limited to 'src/View/Timer.elm')
-rw-r--r-- | src/View/Timer.elm | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/src/View/Timer.elm b/src/View/Timer.elm index 9c302a4..4523334 100644 --- a/src/View/Timer.elm +++ b/src/View/Timer.elm @@ -34,10 +34,9 @@ timerView model (id, timer) = ] [ nameBlock (id, timer) , timeBlock model (id, timer) - , restartBlock (id, timer) , playPauseBlock (id, timer) , stopBlock (id, timer) - , removeBlock model (id, timer) + , removeBlock (id, timer) ] nameBlock : (Id, Timer) -> Html @@ -77,14 +76,6 @@ timeView time = restSeconds = totalSeconds `rem` 60 in (String.padLeft 2 '0' (toString totalMinutes)) ++ " : " ++ (String.padLeft 2 '0' (toString restSeconds)) -restartBlock : (Id, Timer) -> Html -restartBlock (id, timer) = - button - [ class <| "restart block" - , onClick (stopIfRinging (id, timer) (Signal.send updates (UpdateTimer id Restart))) - ] - [ i [ class "fa fa-fw fa-backward" ] [] ] - playPauseBlock : (Id, Timer) -> Html playPauseBlock (id, timer) = button @@ -105,17 +96,13 @@ stopBlock (id, timer) = ] [ i [ class "fa fa-fw fa-stop" ] [] ] -removeBlock : Model -> (Id, Timer) -> Html -removeBlock model (id, timer) = - let removeClass = - if numberOfTimers model > 1 - then "remove" - else "singleRemove" - in button - [ class <| "block " ++ removeClass - , onClick (Signal.send updates (RemoveTimer id)) - ] - [ i [ class "fa fa-fw fa-remove" ] [] ] +removeBlock : (Id, Timer) -> Html +removeBlock (id, timer) = + button + [ class <| "remove block" + , onClick (Signal.send updates (RemoveTimer id)) + ] + [ i [ class "fa fa-fw fa-remove" ] [] ] stopIfRinging : (Id, Timer) -> Signal.Message -> Signal.Message stopIfRinging (id, timer) message = |