diff options
Diffstat (limited to 'src/Timer/View.elm')
-rw-r--r-- | src/Timer/View.elm | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/Timer/View.elm b/src/Timer/View.elm index 561ae8f..662173a 100644 --- a/src/Timer/View.elm +++ b/src/Timer/View.elm @@ -60,7 +60,6 @@ nameBlockEdition id timer edition = , ("empty", isEmpty edition) ] |> classList - , onClick Msg.NoOp ] [ if isEmpty edition then @@ -79,7 +78,6 @@ timeBlockReadOnly : (Id, Timer) -> Html Msg timeBlockReadOnly (id, timer) = div [ class "time" - , onClick (Msg.Edit id Time) ] [ timeWithProgressBar (id, timer) ] @@ -91,7 +89,6 @@ timeBlockEdition (id, timer) edition = , ("empty", isEmpty edition) ] |> classList - , onClick Msg.NoOp ] [ if isEmpty edition then @@ -119,17 +116,18 @@ timeWithProgressBar (id, timer) = [ span [ class "progressBar" , let width = - 1 - timer.time / timer.initialTime - |> (*) 1020 - |> round + 1 - (timer.time / timer.initialTime) + |> (*) 100 |> toString - |> flip String.append "px" + |> flip String.append "%" in style [ ("width", width) ] - , onClick (Msg.UpdateTimer id Timer.Stop) + , onClick (if timer.state == Ringing then Msg.UpdateTimer id Timer.Stop else Msg.NoOp) ] [] , span - [ class "text" ] + [ class "text" + , onClick (Msg.Edit id Time) + ] [ text (timeView timer.time) ] ] |