Permalink
Browse files

Elm upgrade to 0.18

  • Loading branch information...
rundis committed Nov 18, 2016
1 parent 96b9aa5 commit f9284e22767f4b7e5c9a0524a06406d2f40767cc
View
@@ -9,13 +9,12 @@
],
"exposed-modules": [],
"dependencies": {
"elm-community/elm-json-extra": "1.0.0 <= v < 2.0.0",
"elm-community/list-extra": "2.0.0 <= v < 3.0.0",
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-lang/html": "1.0.0 <= v < 2.0.0",
"elm-lang/navigation": "1.0.0 <= v < 2.0.0",
"evancz/elm-http": "3.0.1 <= v < 4.0.0",
"evancz/url-parser": "1.0.0 <= v < 2.0.0"
"elm-community/list-extra": "4.0.0 <= v < 5.0.0",
"elm-lang/core": "5.0.0 <= v < 6.0.0",
"elm-lang/html": "2.0.0 <= v < 3.0.0",
"elm-lang/http": "1.0.0 <= v < 2.0.0",
"elm-lang/navigation": "2.0.1 <= v < 3.0.0",
"evancz/url-parser": "2.0.1 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}
"elm-version": "0.18.0 <= v < 0.19.0"
}
@@ -29,7 +29,7 @@ type Msg
= ShowAlbum Album
| HandleArtistsRetrieved (List Artist)
| FetchArtistsFailed Http.Error
| SetAlbumName (String)
| SetAlbumName String
| SaveAlbum
| HandleSaved Album
| SaveFailed Http.Error
@@ -72,8 +72,8 @@ update msg model =
ShowAlbum album ->
( createAlbumModel model album, Cmd.none )
HandleArtistsRetrieved artists' ->
( { model | artists = artists' }
HandleArtistsRetrieved artists_ ->
( { model | artists = artists_ }
, Cmd.none
)
@@ -262,7 +262,7 @@ view model =
[ div [ class "col-sm-offset-2 col-sm-10" ]
[ button
[ class "btn btn-primary"
, type' "button"
, type_ "button"
, onClick SaveAlbum
]
[ text "Save" ]
@@ -24,7 +24,7 @@ type Msg
| SaveFailed Http.Error
| HandleAlbumsRetrieved (List Album)
| FetchAlbumsFailed Http.Error
| DeleteAlbum (Int)
| DeleteAlbum Int
| HandleAlbumDeleted
| DeleteFailed
@@ -82,8 +82,8 @@ update action model =
, Cmd.none
)
HandleAlbumsRetrieved albums' ->
( { model | albums = albums' }
HandleAlbumsRetrieved albums_ ->
( { model | albums = albums_ }
, Cmd.none
)
@@ -133,7 +133,7 @@ view model =
[ div [ class "col-sm-offset-2 col-sm-10" ]
[ button
[ class "btn btn-primary"
, type' "button"
, type_ "button"
, onClick SaveArtist
]
[ text "Save" ]
@@ -104,8 +104,8 @@ artistDecoder =
encodeArtist : ArtistRequest a -> String
encodeArtist a =
JsonE.encode 0
<| JsonE.object
JsonE.encode 0 <|
JsonE.object
[ ( "artistName", JsonE.string a.name )
]
@@ -180,8 +180,8 @@ trackDecoder =
encodeAlbum : AlbumRequest a -> String
encodeAlbum album =
JsonE.encode 0
<| JsonE.object
JsonE.encode 0 <|
JsonE.object
[ ( "albumName", JsonE.string album.name )
, ( "albumArtistId", JsonE.int album.artistId )
, ( "albumTracks", JsonE.list <| List.map encodeTrack album.tracks )
View
@@ -137,12 +137,12 @@ moveUpView : Model -> Html Msg
moveUpView model =
button
[ onClick (Dispatch MoveUp)
, class
<| "btn btn-sm btn-default "
++ if isPristine model then
"disabled"
else
""
, class <|
"btn btn-sm btn-default "
++ if isPristine model then
"disabled"
else
""
]
[ span [ class "glyphicon glyphicon-arrow-up" ] [] ]
@@ -151,12 +151,12 @@ moveDownView : Model -> Html Msg
moveDownView model =
button
[ onClick (Dispatch MoveDown)
, class
<| "btn btn-sm btn-default "
++ if isPristine model then
"disabled"
else
""
, class <|
"btn btn-sm btn-default "
++ if isPristine model then
"disabled"
else
""
]
[ span [ class "glyphicon glyphicon-arrow-down" ] [] ]
@@ -206,12 +206,12 @@ removeView : Model -> Html Msg
removeView model =
button
[ onClick (Dispatch Remove)
, class
<| "btn btn-sm btn-danger "
++ if isPristine model then
"disabled"
else
""
, class <|
"btn btn-sm btn-danger "
++ if isPristine model then
"disabled"
else
""
]
[ text "Remove" ]

0 comments on commit f9284e2

Please sign in to comment.