Authentication and registration forms: updated to new Bulma module.
parent
4d73afa642
commit
b4bc1f8f77
|
@ -245,34 +245,21 @@ render {
|
||||||
|
|
||||||
render_register_form = HH.form
|
render_register_form = HH.form
|
||||||
[ HE.onSubmit RegisterAttempt ]
|
[ HE.onSubmit RegisterAttempt ]
|
||||||
[ HH.p_
|
[ Bulma.box_input "Login" "login" -- title, placeholder
|
||||||
[ HH.div_
|
(HandleRegisterInput <<< REG_INP_login) -- action
|
||||||
[ HH.input
|
registrationForm.login -- value
|
||||||
[ inputCSS
|
true -- validity (TODO)
|
||||||
, HP.type_ HP.InputText
|
(maybe (HP.disabled true) (\_ -> HP.enabled true) wsConnection) -- condition
|
||||||
, HP.value registrationForm.login
|
, Bulma.box_input "Email" "email@example.com" -- title, placeholder
|
||||||
, HE.onValueInput $ HandleRegisterInput <<< REG_INP_login
|
(HandleRegisterInput <<< REG_INP_email) -- action
|
||||||
, maybe (HP.disabled true) (\_ -> HP.enabled true) wsConnection
|
registrationForm.email -- value
|
||||||
]
|
true -- validity (TODO)
|
||||||
]
|
(maybe (HP.disabled true) (\_ -> HP.enabled true) wsConnection) -- condition
|
||||||
, HH.div_
|
, Bulma.box_password "Password" "password" -- title, placeholder
|
||||||
[ HH.input
|
(HandleRegisterInput <<< REG_INP_pass) -- action
|
||||||
[ inputCSS
|
registrationForm.pass -- value
|
||||||
, HP.type_ HP.InputText
|
true -- validity (TODO)
|
||||||
, HP.value registrationForm.email
|
(maybe (HP.disabled true) (\_ -> HP.enabled true) wsConnection) -- condition
|
||||||
, HE.onValueInput $ HandleRegisterInput <<< REG_INP_email
|
|
||||||
, maybe (HP.disabled true) (\_ -> HP.enabled true) wsConnection
|
|
||||||
]
|
|
||||||
]
|
|
||||||
, HH.div_
|
|
||||||
[ HH.input
|
|
||||||
[ inputCSS
|
|
||||||
, HP.type_ HP.InputPassword
|
|
||||||
, HP.value registrationForm.pass
|
|
||||||
, HE.onValueInput $ HandleRegisterInput <<< REG_INP_pass
|
|
||||||
, maybe (HP.disabled true) (\_ -> HP.enabled true) wsConnection
|
|
||||||
]
|
|
||||||
]
|
|
||||||
, HH.div_
|
, HH.div_
|
||||||
[ HH.button
|
[ HH.button
|
||||||
[ HP.style "padding: 0.5rem 1.25rem;"
|
[ HP.style "padding: 0.5rem 1.25rem;"
|
||||||
|
@ -282,7 +269,6 @@ render {
|
||||||
[ HH.text "Send Message to Server" ]
|
[ HH.text "Send Message to Server" ]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
|
||||||
|
|
||||||
render_messages = HH.ul_ $ map (\msg -> HH.li_ [ HH.text msg ]) messages
|
render_messages = HH.ul_ $ map (\msg -> HH.li_ [ HH.text msg ]) messages
|
||||||
|
|
||||||
|
@ -541,8 +527,6 @@ foreignToArrayBuffer
|
||||||
renderForeignErrors =
|
renderForeignErrors =
|
||||||
String.joinWith "; " <<< A.fromFoldable <<< map F.renderForeignError
|
String.joinWith "; " <<< A.fromFoldable <<< map F.renderForeignError
|
||||||
|
|
||||||
inputCSS = HP.style "padding: 0.5rem 0.75rem; margin-bottom: 0.25rem;"
|
|
||||||
|
|
||||||
print_json_string :: forall m. MonadEffect m => MonadState State m => ArrayBuffer -> m Unit
|
print_json_string :: forall m. MonadEffect m => MonadState State m => ArrayBuffer -> m Unit
|
||||||
print_json_string arraybuffer = do
|
print_json_string arraybuffer = do
|
||||||
-- fromTypedIPC :: ArrayBuffer -> Effect (Either ParseError (Tuple UInt String))
|
-- fromTypedIPC :: ArrayBuffer -> Effect (Either ParseError (Tuple UInt String))
|
||||||
|
|
Loading…
Reference in New Issue