From 5fc15be352eb84a4c92e79fd1c84d93695c2a4d3 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Sun, 11 Feb 2024 20:30:41 +0100 Subject: [PATCH] Some minor changes for convenience. --- src/App/Container.purs | 14 +++++++++----- src/App/DomainListInterface.purs | 1 - 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/App/Container.purs b/src/App/Container.purs index 51e2264..d331b10 100644 --- a/src/App/Container.purs +++ b/src/App/Container.purs @@ -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 diff --git a/src/App/DomainListInterface.purs b/src/App/DomainListInterface.purs index bed7f4a..de7b3df 100644 --- a/src/App/DomainListInterface.purs +++ b/src/App/DomainListInterface.purs @@ -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])