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