Phrasing.

This commit is contained in:
Philippe Pittoli 2024-11-08 02:03:30 +01:00
parent 409e7246e0
commit dd2074b9b9
10 changed files with 30 additions and 30 deletions

View file

@ -724,12 +724,12 @@ handleAction = case _ of
(DNSManager.MkError errmsg) -> do (DNSManager.MkError errmsg) -> do
handleAction $ Log $ ErrorLog errmsg.reason handleAction $ Log $ ErrorLog errmsg.reason
(DNSManager.MkErrorUserNotLogged _) -> do (DNSManager.MkErrorUserNotLogged _) -> do
handleAction $ Log $ ErrorLog $ "The user isn't connected!" handleAction $ Log $ ErrorLog $ "The user isn't connected."
handleAction $ Log $ SystemLog $ "Trying to authenticate to fix the problem..." handleAction $ Log $ SystemLog $ "Trying to authenticate to fix the problem..."
handleAction AuthenticateToDNSManager handleAction AuthenticateToDNSManager
(DNSManager.MkErrorInvalidToken _) -> do (DNSManager.MkErrorInvalidToken _) -> do
H.modify_ _ { token = Nothing, current_page = Home } H.modify_ _ { token = Nothing, current_page = Home }
handleAction $ Log $ ErrorLog $ "Invalid token! Try re-authenticate." handleAction $ Log $ ErrorLog $ "Invalid token. Try re-authenticate."
-- TODO: should we disconnect from authd? -- TODO: should we disconnect from authd?
handleAction $ ToggleAuthenticated Nothing handleAction $ ToggleAuthenticated Nothing
(DNSManager.MkDomainAlreadyExists _) -> do (DNSManager.MkDomainAlreadyExists _) -> do
@ -752,7 +752,7 @@ handleAction = case _ of
<> response.domain <> "\". 🥳 You can now manage it (click on its button)." <> response.domain <> "\". 🥳 You can now manage it (click on its button)."
handleAction $ DispatchDNSMessage m handleAction $ DispatchDNSMessage m
(DNSManager.MkRRReadOnly response) -> do (DNSManager.MkRRReadOnly response) -> do
handleAction $ Log $ ErrorLog $ "Trying to modify a read-only resource! " handleAction $ Log $ ErrorLog $ "Trying to modify a read-only resource. "
<> "domain: " <> response.domain <> "domain: " <> response.domain
<> "resource rrid: " <> show response.rr.rrid <> "resource rrid: " <> show response.rr.rrid
m@(DNSManager.MkRRUpdated _) -> do m@(DNSManager.MkRRUpdated _) -> do
@ -788,7 +788,7 @@ handleAction = case _ of
handleAction $ Log $ SuccessLog "Received orphan domain list." handleAction $ Log $ SuccessLog "Received orphan domain list."
H.tell _admini unit (AdminInterface.GotOrphanDomainList response.domains) H.tell _admini unit (AdminInterface.GotOrphanDomainList response.domains)
(DNSManager.GotKeepAlive _) -> do (DNSManager.GotKeepAlive _) -> do
-- handleAction $ Log $ SystemLog $ "KeepAlive!" -- handleAction $ Log $ SystemLog $ "KeepAlive."
pure unit pure unit
pure unit pure unit
@ -811,7 +811,7 @@ handleAction = case _ of
revert_old_page revert_old_page
Authentication, m@(DNSManager.MkLogged _) -> do Authentication, m@(DNSManager.MkLogged _) -> do
update_domain_list state m update_domain_list state m
-- handleAction $ Log $ SystemLog "go to domain list!" -- handleAction $ Log $ SystemLog "go to domain list."
handleAction $ Routing DomainList handleAction $ Routing DomainList
-- Logged = page just reloaded, but page already changed, no need to do that again. -- Logged = page just reloaded, but page already changed, no need to do that again.
_, m@(DNSManager.MkLogged _) -> do _, m@(DNSManager.MkLogged _) -> do

View file

@ -105,7 +105,7 @@ show_error_domain e = case e of
_ -> Bulma.p """ _ -> Bulma.p """
The domain (or label) contains invalid characters. The domain (or label) contains invalid characters.
A domain label should start with a letter, A domain label should start with a letter,
then eventually a series of letters, digits and hyphenations ("-"), then possibly a series of letters, digits and hyphenations ("-"),
and must finish with either a letter or a digit. and must finish with either a letter or a digit.
""" """

View file

@ -244,9 +244,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 email."
_, _, "" -> H.raise $ Log $ UnableToSend "Write the user's password!" _, _, "" -> H.raise $ Log $ UnableToSend "Write the user's password."
_, _, _ -> do _, _, _ -> do
ab <- H.liftEffect $ AuthD.serialize $ ab <- H.liftEffect $ AuthD.serialize $

View file

@ -299,10 +299,10 @@ handleAction = case _ of
H.raise $ UserLogin login H.raise $ UserLogin login
case login, pass of case login, pass of
"" , _ -> "" , _ ->
H.raise $ Log $ UnableToSend "Please, write your login!" H.raise $ Log $ UnableToSend "Please, write your login."
_ , "" -> _ , "" ->
H.raise $ Log $ UnableToSend "Please, write your password!" H.raise $ Log $ UnableToSend "Please, write your password."
_, _ -> do _, _ -> do
case L.login login, P.password_on_authentication_page pass of case L.login login, P.password_on_authentication_page pass of
@ -320,7 +320,7 @@ handleAction = case _ of
email = passwordRecoveryForm.email email = passwordRecoveryForm.email
case login, email of case login, email of
"", "" -> H.raise $ Log $ UnableToSend "Please, write your login or your email!" "", "" -> H.raise $ Log $ UnableToSend "Please, write your login or your email."
_, _ -> do _, _ -> do
H.raise $ Log $ SystemLog "password recovery" H.raise $ Log $ SystemLog "password recovery"
if email == "" if email == ""

View file

@ -268,7 +268,7 @@ render { accepted_domains, my_domains, newDomainForm, askDomainTransferForm, del
, HH.strong_ [ HH.text "irreversible" ] , HH.strong_ [ HH.text "irreversible" ]
, HH.text "." , HH.text "."
, Bulma.notification_warning' """ , Bulma.notification_warning' """
In case this domain is shared, it won't be deleted, you'll just remove it from your domains. In case this domain is shared, it will just be removed from your domains.
""" """
] ]
@ -284,7 +284,7 @@ render { accepted_domains, my_domains, newDomainForm, askDomainTransferForm, del
owned_domain_row domain = HH.tr_ owned_domain_row domain = HH.tr_
[ HH.td_ [ Bulma.btn domain.name (EnterDomain domain.name) ] [ HH.td_ [ Bulma.btn domain.name (EnterDomain domain.name) ]
, case domain.transfer_key of , case domain.transfer_key of
Just key -> HH.td_ [ Bulma.p key ] Just key -> HH.td_ [ Bulma.p "Token key:", Bulma.p key ]
Nothing -> HH.td_ [ Bulma.btn "Transfer" (TransferDomain domain.name) ] Nothing -> HH.td_ [ Bulma.btn "Transfer" (TransferDomain domain.name) ]
, HH.td_ [ Bulma.btn "Share" (ShareDomain domain.name) ] , HH.td_ [ Bulma.btn "Share" (ShareDomain domain.name) ]
, HH.td_ [ Bulma.alert_btn "Delete" (DeleteDomainModal domain.name) ] , HH.td_ [ Bulma.alert_btn "Delete" (DeleteDomainModal domain.name) ]
@ -385,7 +385,7 @@ handleAction = case _ of
case newDomainForm.new_domain, newDomainForm._errors, new_domain of case newDomainForm.new_domain, newDomainForm._errors, new_domain of
"", _, _ -> "", _, _ ->
H.raise $ Log $ UnableToSend "You didn't enter the new domain." H.raise $ Log $ UnableToSend "Please enter the new domain."
_, [], _ -> do _, [], _ -> do
message <- H.liftEffect message <- H.liftEffect
$ DNSManager.serialize $ DNSManager.serialize
@ -402,7 +402,7 @@ handleAction = case _ of
{ askDomainTransferForm } <- H.get { askDomainTransferForm } <- H.get
case askDomainTransferForm.uuid, askDomainTransferForm._errors of case askDomainTransferForm.uuid, askDomainTransferForm._errors of
"", _ -> "", _ ->
H.raise $ Log $ UnableToSend "You didn't enter the UUID of the transfer." H.raise $ Log $ UnableToSend "Please enter the UUID of the transfer."
uuid, [] -> do uuid, [] -> do
message <- H.liftEffect message <- H.liftEffect
$ DNSManager.serialize $ DNSManager.serialize

View file

@ -42,7 +42,7 @@ render :: forall m. State -> H.ComponentHTML Action () m
render _ = HH.div_ render _ = HH.div_
[ Bulma.hero_danger [ Bulma.hero_danger
"THIS IS A BETA RELEASE" "THIS IS A BETA RELEASE"
"You can register, login and play a bit with the tool. Feel free to report errors and suggestions!" "You can register, login and play a bit with the tool. Feel free to report errors and suggestions."
, Bulma.section_small , Bulma.section_small
[ Bulma.h1 "Welcome to netlib.re" [ Bulma.h1 "Welcome to netlib.re"
, Bulma.subtitle "Free domain names for the common folks" , Bulma.subtitle "Free domain names for the common folks"
@ -68,7 +68,7 @@ render _ = HH.div_
, p "Manage your own DNS zone." , p "Manage your own DNS zone."
] ]
render_no_expert render_no_expert
= b [ title "No need to be an expert!" = b [ title "No need to be an expert"
, p """ , p """
This website will help you through your configuration, as much as we can. This website will help you through your configuration, as much as we can.
""" """
@ -85,7 +85,7 @@ render _ = HH.div_
= b [ title "Automatic updates" = b [ title "Automatic updates"
, p "Update your records with a single, stupidly simple command. For example:" , p "Update your records with a single, stupidly simple command. For example:"
, expl [ Bulma.strong "wget https://netlib.re/token-update/<token>" ] , expl [ Bulma.strong "wget https://netlib.re/token-update/<token>" ]
, p "Every A and AAAA records have tokens for easy updates!" , p "Every A and AAAA records have tokens for easy updates."
] ]
render_why render_why
@ -106,7 +106,7 @@ render _ = HH.div_
, p "This service helps you manage your domain (a subdomain of netlib.re or codelib.re)." , p "This service helps you manage your domain (a subdomain of netlib.re or codelib.re)."
] ]
render_code render_code
= b [ title "I want to see the code!" = b [ title "I want to see the code! 🤓​"
, p "The project is fully open-source (ISC licence)." , p "The project is fully open-source (ISC licence)."
, HH.text "There are a few parts:" , HH.text "There are a few parts:"
, HH.ul_ , HH.ul_

View file

@ -116,10 +116,10 @@ handleAction = case _ of
case login, token of case login, token of
"", _ -> "", _ ->
H.raise $ Log $ UnableToSend "Please, write your login!" H.raise $ Log $ UnableToSend "Please, write your login."
_, "" -> _, "" ->
H.raise $ Log $ UnableToSend "Please, write your token!" H.raise $ Log $ UnableToSend "Please, write your token."
_, _ -> do _, _ -> do
case L.login login, T.token token of case L.login login, T.token token of

View file

@ -158,13 +158,13 @@ handleAction = case _ of
case login, email, pass of case login, email, pass of
"", _, _ -> "", _, _ ->
H.raise $ Log $ UnableToSend "Please, write your login!" H.raise $ Log $ UnableToSend "Please, write your login."
_, "", _ -> _, "", _ ->
H.raise $ Log $ UnableToSend "Please, write your email!" H.raise $ Log $ UnableToSend "Please, write your email."
_, _, "" -> _, _, "" ->
H.raise $ Log $ UnableToSend "Please, write your password!" H.raise $ Log $ UnableToSend "Please, write your password."
_, _, _ -> do _, _, _ -> do
case L.login login, E.email email, P.password pass of case L.login login, E.email email, P.password pass of

View file

@ -113,7 +113,7 @@ render { modal, newPasswordForm, new_email_address, emails } =
where where
render_current (Just (Email.Email e)) = [ Bulma.p $ "Current email address: " ] <> render_current (Just (Email.Email e)) = [ Bulma.p $ "Current email address: " ] <>
[ Bulma.btn_ro (C.is_small <> C.is_warning) e] [ Bulma.btn_ro (C.is_small <> C.is_warning) e]
render_current Nothing = [ Bulma.p "You do not currently have a validated email address!" ] render_current Nothing = [ Bulma.p "You do not currently have a validated email address." ]
render_pending (Just (Email.Email e)) = [ Bulma.p $ "Pending email address: " ] <> render_pending (Just (Email.Email e)) = [ Bulma.p $ "Pending email address: " ] <>
[ Bulma.btn_ro (C.is_small <> C.is_warning) e] [ Bulma.btn_ro (C.is_small <> C.is_warning) e]
@ -169,7 +169,7 @@ handleAction = case _ of
{ new_email_address } <- H.get { new_email_address } <- H.get
case new_email_address of case new_email_address of
"" -> H.raise $ Log $ UnableToSend "Please, write your new email address!" "" -> H.raise $ Log $ UnableToSend "Please, write your new email address."
email_address -> do email_address -> do
case E.email email_address of case E.email email_address of
Left errors -> H.raise $ Log $ UnableToSend $ A.fold $ map show_error_email errors Left errors -> H.raise $ Log $ UnableToSend $ A.fold $ map show_error_email errors
@ -180,8 +180,8 @@ handleAction = case _ of
{ newPasswordForm } <- H.get { newPasswordForm } <- H.get
case newPasswordForm.password, newPasswordForm.confirmation of case newPasswordForm.password, newPasswordForm.confirmation of
"" , _ -> H.raise $ Log $ UnableToSend "Please, write your password!" "" , _ -> H.raise $ Log $ UnableToSend "Please, write your password."
_ , "" -> H.raise $ Log $ UnableToSend "Please, confirm your password!" _ , "" -> H.raise $ Log $ UnableToSend "Please, confirm your password."
pass, confirmation -> do pass, confirmation -> do
if pass == confirmation if pass == confirmation
then case P.password pass of then case P.password pass of

View file

@ -177,7 +177,7 @@ handleAction action = do
SendMessage array_buffer_to_send -> do SendMessage array_buffer_to_send -> do
case wsInfo.connection of case wsInfo.connection of
Nothing -> H.raise $ Log $ UnableToSend $ "Websocket is down!" Nothing -> H.raise $ Log $ UnableToSend $ "Websocket is down."
Just webSocket -> H.liftEffect $ do Just webSocket -> H.liftEffect $ do
sendArrayBuffer webSocket array_buffer_to_send sendArrayBuffer webSocket array_buffer_to_send