diff options
Diffstat (limited to 'src/View')
-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 = |