WIP: Authd Admin: Search User Interface.

beta
Philippe Pittoli 2024-02-17 02:56:25 +01:00
parent b60913ef02
commit fefe6769f2
1 changed files with 9 additions and 15 deletions

View File

@ -142,7 +142,7 @@ generic_button action active =
HH.button
[ HP.style "padding: 0.5rem 1.25rem;"
, HP.type_ HP.ButtonSubmit
, HE.onClick \_ -> SearchUserAttempt
, HE.onClick \_ -> action
, (if active then (HP.enabled true) else (HP.disabled true))
]
[ HH.text "Send Message to Server" ]
@ -177,14 +177,9 @@ handleAction = case _ of
pass = addUserForm.pass
case login, email, pass of
"", _, _ ->
H.raise $ Log $ UnableToSend "Write the user's login!"
_, "", _ ->
H.raise $ Log $ UnableToSend "Write the user's email!"
_, _, "" ->
H.raise $ Log $ UnableToSend "Write the user's password!"
"", _, _ -> H.raise $ Log $ UnableToSend "Write the user's login!"
_, "", _ -> H.raise $ Log $ UnableToSend "Write the user's email!"
_, _, "" -> H.raise $ Log $ UnableToSend "Write the user's password!"
_, _, _ -> do
ab <- H.liftEffect $ AuthD.serialize $ AuthD.MkAddUser { login: login
@ -204,12 +199,11 @@ handleAction = case _ of
H.modify_ _ { page = page }
SearchUserAttempt -> do
{ searchUserForm } <- H.get
let login = searchUserForm.login
email = searchUserForm.email
-- domain = searchUserForm.domain
admin = searchUserForm.admin
--{ searchUserForm } <- H.get
--let login = searchUserForm.login
-- email = searchUserForm.email
-- -- domain = searchUserForm.domain
-- admin = searchUserForm.admin
--ab <- H.liftEffect $ AuthD.serialize $ AuthD.MkSearchUser { login:
-- , admin:
-- , email: Just (Email.Email email)