aboutsummaryrefslogtreecommitdiff
path: root/src/View
diff options
context:
space:
mode:
Diffstat (limited to 'src/View')
-rw-r--r--src/View/Timer.elm2
-rw-r--r--src/View/View.elm27
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