From 29eac851219e36bccf2724b05d52b70438b5bf3f Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Sat, 21 Mar 2015 12:40:48 +0100 Subject: Removing restart button --- src/View/Timer.elm | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) (limited to 'src/View/Timer.elm') 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 = -- cgit v1.2.3