diff options
Diffstat (limited to 'src/View')
-rw-r--r-- | src/View/Timer.elm | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/View/Timer.elm b/src/View/Timer.elm index 50144ef..a88f9dd 100644 --- a/src/View/Timer.elm +++ b/src/View/Timer.elm @@ -49,17 +49,18 @@ nameBlockEdition : Id -> Timer -> Edition -> Html nameBlockEdition id timer edition = div [ [ (True, "name block edition") - , (List.isEmpty edition.chars, "empty") + , (isEmpty edition, "empty") ] |> activatedClasses , onClick (Signal.send updates NoOp) ] - [ if List.isEmpty edition.chars + [ if isEmpty edition then text (timerName id timer) else edition.chars |> renderNameEdition + |> flip String.append "_" |> text ] @@ -83,20 +84,19 @@ timeBlockReadOnly id timer = timeBlockEdition : Timer -> Edition -> Html timeBlockEdition timer edition = - let isEmptyEdition = List.isEmpty edition.chars - in div - [ [ (True, "time block edition") - , (isEmptyEdition, "empty") - ] - |> activatedClasses - , onClick (Signal.send updates NoOp) - ] - [ if isEmptyEdition - then - timeWithProgressBar timer - else - text (editionView edition.chars) - ] + div + [ [ (True, "time block edition") + , (isEmpty edition, "empty") + ] + |> activatedClasses + , onClick (Signal.send updates NoOp) + ] + [ if isEmpty edition + then + timeWithProgressBar timer + else + text (editionView edition.chars) + ] editionView : List Char -> String editionView numbers = |