switch to using Browser.document so we can set title
This commit is contained in:
parent
92cdbdb8a9
commit
71e10f9008
44
src/Main.elm
44
src/Main.elm
@ -1,6 +1,6 @@
|
|||||||
module Main exposing (..)
|
module Main exposing (..)
|
||||||
|
|
||||||
import Browser
|
import Browser exposing (Document)
|
||||||
import Css exposing (padding, px)
|
import Css exposing (padding, px)
|
||||||
import Html.Styled exposing (..)
|
import Html.Styled exposing (..)
|
||||||
import Html.Styled.Attributes exposing (css, disabled, href, placeholder, style)
|
import Html.Styled.Attributes exposing (css, disabled, href, placeholder, style)
|
||||||
@ -36,9 +36,9 @@ type alias Model =
|
|||||||
|
|
||||||
main : Program () Model Msg
|
main : Program () Model Msg
|
||||||
main =
|
main =
|
||||||
Browser.element
|
Browser.document
|
||||||
{ init = init
|
{ init = init
|
||||||
, view = view >> toUnstyled
|
, view = view
|
||||||
, update = update
|
, update = update
|
||||||
, subscriptions = \_ -> Sub.none
|
, subscriptions = \_ -> Sub.none
|
||||||
}
|
}
|
||||||
@ -86,27 +86,33 @@ init _ =
|
|||||||
( initialModel, Cmd.none )
|
( initialModel, Cmd.none )
|
||||||
|
|
||||||
|
|
||||||
view : Model -> Html Msg
|
view : Model -> Document Msg
|
||||||
view model =
|
view model =
|
||||||
div
|
{ body =
|
||||||
[ css
|
[ Html.Styled.toUnstyled
|
||||||
[ padding (px 30)
|
(div
|
||||||
]
|
[ css
|
||||||
]
|
[ padding (px 30)
|
||||||
[ div []
|
|
||||||
[ div []
|
|
||||||
[ input [ placeholder "search...", onInput SetPR ] []
|
|
||||||
, button
|
|
||||||
[ onClick RunSearch
|
|
||||||
, disabled (viewValidation model)
|
|
||||||
]
|
]
|
||||||
[ text "Search" ]
|
|
||||||
]
|
]
|
||||||
, div []
|
[ div []
|
||||||
[ viewResult model
|
[ div []
|
||||||
|
[ input [ placeholder "search...", onInput SetPR ] []
|
||||||
|
, button
|
||||||
|
[ onClick RunSearch
|
||||||
|
, disabled (viewValidation model)
|
||||||
|
]
|
||||||
|
[ text "Search" ]
|
||||||
|
]
|
||||||
|
, div []
|
||||||
|
[ viewResult model
|
||||||
|
]
|
||||||
|
]
|
||||||
]
|
]
|
||||||
]
|
)
|
||||||
]
|
]
|
||||||
|
, title = "pr-status"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
viewValidation : Model -> Bool
|
viewValidation : Model -> Bool
|
||||||
|
Loading…
Reference in New Issue
Block a user