* Sanitize server url. * Prettify auth page.
This commit is contained in:
parent
b5fa55f49d
commit
5f457f009a
@ -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"
|
||||
|
16
src/View.elm
16
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 ]
|
||||
|
Loading…
Reference in New Issue
Block a user