Even less exclamation points.
This commit is contained in:
parent
a45fc80ee8
commit
d38c7cb653
@ -253,7 +253,7 @@ render state
|
|||||||
Administration -> render_authd_admin_interface
|
Administration -> render_authd_admin_interface
|
||||||
-- The footer includes logs and both the WS child components.
|
-- The footer includes logs and both the WS child components.
|
||||||
, Bulma.hr
|
, Bulma.hr
|
||||||
, Bulma.columns_ [ Bulma.column_ [ Bulma.h3 "Logs (watch this if something fails! 😅)", render_logs ]
|
, Bulma.columns_ [ Bulma.column_ [ Bulma.h3 "Logs (watch this if something fails 😅)", render_logs ]
|
||||||
, Bulma.column_ [ render_auth_WS, render_dnsmanager_WS ] ]
|
, Bulma.column_ [ render_auth_WS, render_dnsmanager_WS ] ]
|
||||||
]
|
]
|
||||||
where
|
where
|
||||||
@ -274,7 +274,7 @@ render state
|
|||||||
render_setup :: forall monad. MonadAff monad => H.ComponentHTML Action ChildSlots monad
|
render_setup :: forall monad. MonadAff monad => H.ComponentHTML Action ChildSlots monad
|
||||||
render_setup = case state.token of
|
render_setup = case state.token of
|
||||||
Just token -> HH.slot _setupi unit SetupInterface.component token SetupInterfaceEvent
|
Just token -> HH.slot _setupi unit SetupInterface.component token SetupInterfaceEvent
|
||||||
Nothing -> Bulma.p "You shouldn't see this page. Reconnect!"
|
Nothing -> Bulma.p "You shouldn't see this page. Please, reconnect."
|
||||||
render_mail_validation :: forall monad. MonadAff monad => H.ComponentHTML Action ChildSlots monad
|
render_mail_validation :: forall monad. MonadAff monad => H.ComponentHTML Action ChildSlots monad
|
||||||
render_mail_validation = HH.slot _mvi unit MVI.component unit MailValidationInterfaceEvent
|
render_mail_validation = HH.slot _mvi unit MVI.component unit MailValidationInterfaceEvent
|
||||||
render_zone :: forall monad. String -> MonadAff monad => H.ComponentHTML Action ChildSlots monad
|
render_zone :: forall monad. String -> MonadAff monad => H.ComponentHTML Action ChildSlots monad
|
||||||
@ -310,7 +310,7 @@ render state
|
|||||||
handleAction :: forall o monad. MonadAff monad => Action -> H.HalogenM State Action ChildSlots o monad Unit
|
handleAction :: forall o monad. MonadAff monad => Action -> H.HalogenM State Action ChildSlots o monad Unit
|
||||||
handleAction = case _ of
|
handleAction = case _ of
|
||||||
Initialize -> do
|
Initialize -> do
|
||||||
handleAction $ Log $ SystemLog "Hello, welcome to this application! 🥳"
|
handleAction $ Log $ SystemLog "Hello, welcome to this application. 🥳"
|
||||||
sessionstorage <- H.liftEffect $ Window.sessionStorage =<< HTML.window
|
sessionstorage <- H.liftEffect $ Window.sessionStorage =<< HTML.window
|
||||||
token <- H.liftEffect $ Storage.getItem "user-authd-token" sessionstorage
|
token <- H.liftEffect $ Storage.getItem "user-authd-token" sessionstorage
|
||||||
case token of
|
case token of
|
||||||
@ -357,7 +357,7 @@ handleAction = case _ of
|
|||||||
|
|
||||||
AuthenticateToAuthd v -> case v of
|
AuthenticateToAuthd v -> case v of
|
||||||
Left token -> do
|
Left token -> do
|
||||||
handleAction $ Log $ SystemLog "Authenticate to authd with a token!"
|
handleAction $ Log $ SystemLog "Authenticate to authd with a token."
|
||||||
message <- H.liftEffect $ AuthD.serialize $ AuthD.MkAuthByToken { token }
|
message <- H.liftEffect $ AuthD.serialize $ AuthD.MkAuthByToken { token }
|
||||||
H.tell _ws_auth unit (WS.ToSend message)
|
H.tell _ws_auth unit (WS.ToSend message)
|
||||||
Right (Tuple login password) -> do
|
Right (Tuple login password) -> do
|
||||||
@ -526,11 +526,11 @@ handleAction = case _ of
|
|||||||
handleAction $ Routing MailValidation
|
handleAction $ Routing MailValidation
|
||||||
_ -> handleAction $ DispatchAuthDaemonMessage m
|
_ -> handleAction $ DispatchAuthDaemonMessage m
|
||||||
(AuthD.GotUserEdited u) -> do
|
(AuthD.GotUserEdited u) -> do
|
||||||
handleAction $ Log $ SuccessLog $ "User (" <> show u.uid <> ") was modified!"
|
handleAction $ Log $ SuccessLog $ "User (" <> show u.uid <> ") was modified."
|
||||||
(AuthD.GotUserValidated _) -> do
|
(AuthD.GotUserValidated _) -> do
|
||||||
handleAction $ Log $ SuccessLog "User got validated! You can now log in!"
|
handleAction $ Log $ SuccessLog "User got validated. You can now log in."
|
||||||
handleAction $ Routing Authentication
|
handleAction $ Routing Authentication
|
||||||
handleAction $ AddNotif $ GoodNotification "User got validated! You can now log in!"
|
handleAction $ AddNotif $ GoodNotification "User got validated. You can now log in."
|
||||||
(AuthD.GotUsersList _) -> do
|
(AuthD.GotUsersList _) -> do
|
||||||
handleAction $ Log $ ErrorLog "TODO: received a GotUsersList message."
|
handleAction $ Log $ ErrorLog "TODO: received a GotUsersList message."
|
||||||
(AuthD.GotPermissionCheck _) -> do
|
(AuthD.GotPermissionCheck _) -> do
|
||||||
@ -538,9 +538,9 @@ handleAction = case _ of
|
|||||||
(AuthD.GotPermissionSet _) -> do
|
(AuthD.GotPermissionSet _) -> do
|
||||||
handleAction $ Log $ ErrorLog "Received a GotPermissionSet message."
|
handleAction $ Log $ ErrorLog "Received a GotPermissionSet message."
|
||||||
m@(AuthD.GotPasswordRecovered _) -> do
|
m@(AuthD.GotPasswordRecovered _) -> do
|
||||||
handleAction $ Log $ SuccessLog "your new password is now valid!"
|
handleAction $ Log $ SuccessLog "your new password is now valid."
|
||||||
handleAction $ DispatchAuthDaemonMessage m
|
handleAction $ DispatchAuthDaemonMessage m
|
||||||
handleAction $ AddNotif $ GoodNotification "Your new password is now valid!"
|
handleAction $ AddNotif $ GoodNotification "Your new password is now valid."
|
||||||
m@(AuthD.GotMatchingUsers _) -> do
|
m@(AuthD.GotMatchingUsers _) -> do
|
||||||
{ current_page } <- H.get
|
{ current_page } <- H.get
|
||||||
case current_page of
|
case current_page of
|
||||||
@ -570,8 +570,8 @@ handleAction = case _ of
|
|||||||
handleAction $ AddNotif $ BadNotification $ "Sorry, authd sent an error message. "
|
handleAction $ AddNotif $ BadNotification $ "Sorry, authd sent an error message. "
|
||||||
<> maybe "The server didn't tell why." (\v -> "Message was: " <> v) errmsg.reason
|
<> maybe "The server didn't tell why." (\v -> "Message was: " <> v) errmsg.reason
|
||||||
m@(AuthD.GotPasswordRecoverySent _) -> do
|
m@(AuthD.GotPasswordRecoverySent _) -> do
|
||||||
handleAction $ Log $ SuccessLog $ "Password recovery: email sent!"
|
handleAction $ Log $ SuccessLog $ "Password recovery: email sent."
|
||||||
handleAction $ AddNotif $ GoodNotification "Your password recovery mail has been sent!"
|
handleAction $ AddNotif $ GoodNotification "Your password recovery mail has been sent."
|
||||||
handleAction $ DispatchAuthDaemonMessage m
|
handleAction $ DispatchAuthDaemonMessage m
|
||||||
(AuthD.GotErrorPasswordTooShort _) -> do
|
(AuthD.GotErrorPasswordTooShort _) -> do
|
||||||
handleAction $ Log $ ErrorLog "Password too short!"
|
handleAction $ Log $ ErrorLog "Password too short!"
|
||||||
@ -584,7 +584,7 @@ handleAction = case _ of
|
|||||||
handleAction $ ToggleAuthenticated Nothing
|
handleAction $ ToggleAuthenticated Nothing
|
||||||
handleAction $ AddNotif $ BadNotification "Invalid credentials!"
|
handleAction $ AddNotif $ BadNotification "Invalid credentials!"
|
||||||
(AuthD.GotErrorRegistrationsClosed _) -> do
|
(AuthD.GotErrorRegistrationsClosed _) -> do
|
||||||
handleAction $ Log $ ErrorLog "Registration closed! Try another time or contact an administrator."
|
handleAction $ Log $ ErrorLog "Registration closed. Try another time or contact an administrator."
|
||||||
handleAction $ AddNotif $ BadNotification "Registration are closed at the moment."
|
handleAction $ AddNotif $ BadNotification "Registration are closed at the moment."
|
||||||
(AuthD.GotErrorInvalidLoginFormat _) -> do
|
(AuthD.GotErrorInvalidLoginFormat _) -> do
|
||||||
handleAction $ Log $ ErrorLog "Invalid login format!"
|
handleAction $ Log $ ErrorLog "Invalid login format!"
|
||||||
@ -612,7 +612,7 @@ handleAction = case _ of
|
|||||||
handleAction $ AddNotif $ BadNotification "Invalid renew key!"
|
handleAction $ AddNotif $ BadNotification "Invalid renew key!"
|
||||||
-- The authentication was a success!
|
-- The authentication was a success!
|
||||||
(AuthD.GotToken msg) -> do
|
(AuthD.GotToken msg) -> do
|
||||||
handleAction $ Log $ SuccessLog $ "Authenticated to authd!"
|
handleAction $ Log $ SuccessLog $ "Authenticated to authd."
|
||||||
H.modify_ _ { token = Just msg.token }
|
H.modify_ _ { token = Just msg.token }
|
||||||
handleAction $ ToggleAuthenticated (Just msg.token)
|
handleAction $ ToggleAuthenticated (Just msg.token)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user