Some minor changes for convenience.

beta
Philippe Pittoli 2024-02-11 20:30:41 +01:00
parent f9f79875c0
commit 5fc15be352
2 changed files with 9 additions and 6 deletions

View File

@ -350,16 +350,21 @@ handleAction = case _ of
(AuthD.UnknownNumber ) -> handleAction $ Log $ SimpleLog ("[🤖] Parsing error: AuthD.UnknownNumber")
-- Cases where we understood the message.
-- TODO: create a modal to show some of these?
Right response -> do
case response of
(AuthD.GotUser _) -> do
handleAction $ Log $ SimpleLog "[😈] TODO: received a GotUser message."
(AuthD.GotUserAdded _) -> do
handleAction $ Log $ SimpleLog "[😈] TODO: received a GotUserAdded message."
handleAction $ Log $ SimpleLog """
[🎉] you are now registered, copy the token we sent you by email to finish your registration.
"""
handleAction $ Routing MailValidation
(AuthD.GotUserEdited _) -> do
handleAction $ Log $ SimpleLog "[😈] TODO: received a GotUserEdited message."
(AuthD.GotUserValidated _) -> do
handleAction $ Log $ SimpleLog "[😈] TODO: received a GotUserValidated message."
handleAction $ Log $ SimpleLog "[🎉] you got validated! You can now log in!"
handleAction $ Routing Authentication
(AuthD.GotUsersList _) -> do
handleAction $ Log $ SimpleLog "[😈] TODO: received a GotUsersList message."
(AuthD.GotPermissionCheck _) -> do
@ -561,7 +566,6 @@ handleAction = case _ of
state <- H.get
case state.current_page, message of
Home, m@(DNSManager.MkLogged _) -> do
handleAction $ Log $ SystemLog "page reload!"
case state.store_DomainListInterface_state of
Nothing -> do
let new_value = DomainListInterface.page_reload (DomainListInterface.initialState unit) m
@ -577,13 +581,13 @@ handleAction = case _ of
Just "Authentication" -> handleAction $ Routing Authentication
Just "Registration" -> handleAction $ Routing Registration
Just "DomainList" -> handleAction $ Routing DomainList
Just "MailValidation" -> handleAction $ Routing MailValidation
Just "Zone" -> do
handleAction $ Log $ SystemLog "wait, we were on the Zone page!!"
domain <- H.liftEffect $ Storage.getItem "current-zone" sessionstorage
case domain of
Nothing -> handleAction $ Log $ SystemLog "Zone but no domain recorded!! WEIRD"
Just zone -> do handleAction $ Log $ SystemLog $ "Zone where to go: " <> zone
Just zone -> do handleAction $ Log $ SystemLog $ "zone to display: " <> zone
handleAction $ Routing (Zone zone)
Just "AuthAdmin" -> handleAction $ Routing AuthAdmin

View File

@ -329,7 +329,6 @@ handleQuery = case _ of
(DNSManager.MkLogged response) -> do
handleAction $ UpdateAcceptedDomains response.accepted_domains
handleAction $ UpdateMyDomains response.my_domains
H.raise $ Log $ SimpleLog $ "[😈] LOOOOOOOOOGGED DomainListInterface."
(DNSManager.MkDomainAdded response) -> do
{ my_domains } <- H.get
handleAction $ UpdateMyDomains (my_domains <> [response.domain])