diff options
author | Joris Guyonvarch | 2015-03-16 21:59:06 +0100 |
---|---|---|
committer | Joris Guyonvarch | 2015-03-16 21:59:06 +0100 |
commit | 8060fc370a8e16c7f39b1f63c6dc9127073eb5fe (patch) | |
tree | a1d049b1cd5afc55c12897a33b0ed7fddaa0e7dc /src/View | |
parent | 36cb1d0392f4d32a4eed50ef2cc098dc90bb44e1 (diff) |
Updating design
Diffstat (limited to 'src/View')
-rw-r--r-- | src/View/Timer.elm | 2 | ||||
-rw-r--r-- | src/View/View.elm | 27 |
2 files changed, 10 insertions, 19 deletions
diff --git a/src/View/Timer.elm b/src/View/Timer.elm index 271de5c..5d34c7e 100644 --- a/src/View/Timer.elm +++ b/src/View/Timer.elm @@ -49,4 +49,4 @@ timeView time = let totalSeconds = truncate (time / 1000) totalMinutes = totalSeconds // 60 restSeconds = totalSeconds `rem` 60 - in (toString totalMinutes) ++ ":" ++ (String.padLeft 2 '0' (toString restSeconds)) + in (toString totalMinutes) ++ " : " ++ (String.padLeft 2 '0' (toString restSeconds)) diff --git a/src/View/View.elm b/src/View/View.elm index ae60807..2f12902 100644 --- a/src/View/View.elm +++ b/src/View/View.elm @@ -24,7 +24,7 @@ view model = div [] [ h1 [] [ text "Timer" ] - , addTimer model.newTimerName + , addTimer , model.timers |> Dict.toList |> List.sortBy (.creationTime << snd) @@ -32,24 +32,15 @@ view model = |> timers ] -addTimer : String -> Html -addTimer name = - div - [ class "addTimer" ] - [ input - [ placeholder "Name" - , value name - , on "input" targetValue (Signal.send updates << RenameNewTimer) - , onEnter (Signal.send updates AddNewTimer) - , autofocus True - ] +addTimer : Html +addTimer = + button + [ class "addTimer" + , onClick (Signal.send updates AddNewTimer) + ] + [ i + [ class "fa fa-fw fa-plus" ] [] - , button - [ onClick (Signal.send updates AddNewTimer) ] - [ i - [ class "fa fa-fw fa-plus" ] - [] - ] ] onEnter : Signal.Message -> Attribute |