diff options
author | Joris | 2016-09-04 21:21:11 +0200 |
---|---|---|
committer | Joris | 2016-09-04 21:21:31 +0200 |
commit | 973a039b54327df74396605410ea9abe19c8a4e7 (patch) | |
tree | c702564d17e0a490d56845027238eb4f231be785 /src/View/View.elm | |
parent | 62fee9133f36f655c1ed83e0c2e85394f9948bf5 (diff) |
Upgrade to elm 0.17.1
Diffstat (limited to 'src/View/View.elm')
-rw-r--r-- | src/View/View.elm | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/src/View/View.elm b/src/View/View.elm deleted file mode 100644 index a69d662..0000000 --- a/src/View/View.elm +++ /dev/null @@ -1,67 +0,0 @@ -module View.View - ( view - ) where - -import Html exposing (..) -import Html.Attributes exposing (..) -import Html.Events exposing (..) -import Signal -import List -import Dict -import Json.Decode as Json - -import Model.Model exposing (..) -import Model.Timer exposing (..) -import Model.Id exposing (..) - -import Update.Update exposing (..) - -import View.Timer exposing (timerView) - -view : Model -> Html -view model = - div - [] - [ title - , model.timers - |> Dict.toList - |> List.sortBy (.creationTime << snd) - |> timers model - ] - -title : Html -title = - div - [ class "headerBar" ] - [ button - [ onClick actions.address Initialize - , class "title" - ] - [ text "Timer" ] - , button - [ onClick actions.address AddNewTimer - , class "addTimer" - ] - [ i - [ class "fa fa-fw fa-plus" ] - [] - ] - ] - -onEnter : Signal.Message -> Attribute -onEnter message = - on "keydown" - (Json.customDecoder keyCode is13) - (always message) - -is13 : Int -> Result String () -is13 code = - if code == 13 - then Ok() - else Err "Not the right key code" - -timers : Model -> List (Id, Timer) -> Html -timers model timers = - div - [ class "timers" ] - (List.map (timerView model) timers) |