diff --git a/src/Model.elm b/src/Model.elm index 1779a39..6317d71 100644 --- a/src/Model.elm +++ b/src/Model.elm @@ -160,9 +160,15 @@ registerApp { server, location } = let appUrl = location.origin ++ location.pathname + + cleanServer = + if String.endsWith "/" server then + String.dropRight 1 server + else + server in Mastodon.register - server + cleanServer "tooty" appUrl "read write follow" diff --git a/src/View.elm b/src/View.elm index 911d7bb..f778439 100644 --- a/src/View.elm +++ b/src/View.elm @@ -567,7 +567,21 @@ homepageView model = authView : Model -> Html Msg authView model = div [ class "col-md-4 col-md-offset-4" ] - [ div [ class "panel panel-default" ] + [ div [ class "page-header" ] + [ h1 [] + [ text "tooty" + , small [] + [ text " is a Web client for the " + , a + [ href "https://github.com/tootsuite/mastodon" + , target "_blank" + ] + [ text "Mastodon" ] + , text " API." + ] + ] + ] + , div [ class "panel panel-default" ] [ div [ class "panel-heading" ] [ text "Authenticate" ] , div [ class "panel-body" ] [ Html.form [ class "form", onSubmit Register ]