Fix some comments.

This commit is contained in:
Philippe Pittoli 2025-04-28 02:09:26 +02:00
parent 0296f27e27
commit f2b88a1209
8 changed files with 20 additions and 20 deletions

View file

@ -1,4 +1,4 @@
-- | `App.AuthenticationInterface` is both the authentication and password recovery interface. -- | `App.Page.Authentication` is both the authentication and password recovery interface.
-- | TODO: token validation. -- | TODO: token validation.
module App.Page.Authentication where module App.Page.Authentication where
@ -362,5 +362,5 @@ handleQuery = case _ of
AuthD.GotPasswordRecoverySent _ -> do AuthD.GotPasswordRecoverySent _ -> do
handleAction $ ChangeTab Recovery handleAction $ ChangeTab Recovery
_ -> do _ -> do
H.raise $ Log $ ErrorLog $ "Message not handled in AuthenticationInterface." H.raise $ Log $ ErrorLog $ "Message not handled in Authentication."
pure Nothing pure Nothing

View file

@ -1,4 +1,4 @@
-- | `App.DomainListInterface` is a simple component with the list of own domains -- | `App.Page.DomainList` is a simple component with the list of own domains
-- | and a form to add a new domain. -- | and a form to add a new domain.
-- | -- |
-- | This interface enables to: -- | This interface enables to:
@ -38,7 +38,7 @@ import App.Type.DomainInfo
import App.Type.LogMessage (LogMessage(..)) import App.Type.LogMessage (LogMessage(..))
import App.Message.DNSManagerDaemon as DNSManager import App.Message.DNSManagerDaemon as DNSManager
-- | `App.DomainListInterface` can send messages through websocket interface -- | `App.Page.DomainList` can send messages through websocket interface
-- | connected to dnsmanagerd. See `App.WS`. -- | connected to dnsmanagerd. See `App.WS`.
-- | -- |
-- | Also, this component can log messages and ask its parent (`App.Container`) to -- | Also, this component can log messages and ask its parent (`App.Container`) to
@ -58,7 +58,7 @@ data Output
| AskState | AskState
| StoreState State | StoreState State
-- | `App.DomainListInterface` can receive messages from `dnsmanagerd`. -- | `App.Page.DomainList` can receive messages from `dnsmanagerd`.
-- | -- |
-- | The component is also informed when the connection is lost or up again. -- | The component is also informed when the connection is lost or up again.
-- | -- |
@ -71,11 +71,11 @@ data Query a
type Slot = H.Slot Query Output type Slot = H.Slot Query Output
-- | `App.DomainListInterface` has no input. -- | `App.Page.DomainList` has no input.
type Input = Unit type Input = Unit
-- | `App.DomainListInterface` has a single form to add a new domain. -- | `App.Page.DomainList` has a single form to add a new domain.
-- | Only two possible inputs: the (sub)domain name and the selection of the TLD. -- | Only two possible inputs: the (sub)domain name and the selection of the TLD.
data NewDomainFormAction data NewDomainFormAction
@ -444,7 +444,7 @@ handleQuery = case _ of
(DNSManager.MkDomainDeleted response) -> do (DNSManager.MkDomainDeleted response) -> do
{ my_domains } <- H.get { my_domains } <- H.get
handleAction $ UpdateMyDomains $ A.filter (\d -> d.name /= response.domain) my_domains handleAction $ UpdateMyDomains $ A.filter (\d -> d.name /= response.domain) my_domains
_ -> H.raise $ Log $ ErrorLog $ "Message not handled in DomainListInterface." _ -> H.raise $ Log $ ErrorLog $ "Message not handled in DomainList."
pure (Just a) pure (Just a)
page_reload :: State -> DNSManager.AnswerMessage -> State page_reload :: State -> DNSManager.AnswerMessage -> State

View file

@ -1,4 +1,4 @@
-- | `App.HomeInterface` presents the website and its features. -- | `App.Page.Home` presents the website and its features.
module App.Page.Home where module App.Page.Home where
import Prelude (Unit, pure, unit, ($)) import Prelude (Unit, pure, unit, ($))

View file

@ -1,4 +1,4 @@
-- | `App.MailValidationInterface` is a simple interface for mail verification. -- | `App.Page.MailValidation` is a simple interface for mail verification.
-- | A token is sent at registration at the provided email address. -- | A token is sent at registration at the provided email address.
-- | This token has to be used to validate the email address. -- | This token has to be used to validate the email address.
module App.Page.MailValidation where module App.Page.MailValidation where

View file

@ -1,4 +1,4 @@
-- | `App.NavigationInterface` is the navbar module. -- | `App.Page.Navigation` is the navbar module.
-- | -- |
-- | This module is required since some javascript is needed to toggle display of hidden resources. -- | This module is required since some javascript is needed to toggle display of hidden resources.
-- | On mobile, a burger menu is displayed and hides the navigation buttons. -- | On mobile, a burger menu is displayed and hides the navigation buttons.

View file

@ -1,4 +1,4 @@
-- | `App.RegistrationInterface` is a registration interface. -- | `App.Page.Registration` is a registration interface.
-- | Registration requires a login, an email address and a password. -- | Registration requires a login, an email address and a password.
module App.Page.Registration where module App.Page.Registration where

View file

@ -1,4 +1,4 @@
-- | `App.SetupInterface` enables users to change their password or their email address. -- | `App.Page.Setup` enables users to change their password or their email address.
-- | Users can also erase their account. -- | Users can also erase their account.
module App.Page.Setup where module App.Page.Setup where
@ -194,5 +194,5 @@ handleQuery = case _ of
MessageReceived message _ -> do MessageReceived message _ -> do
case message of case message of
_ -> do _ -> do
H.raise $ Log $ ErrorLog $ "Message not handled in SetupInterface." H.raise $ Log $ ErrorLog $ "Message not handled in Setup."
pure Nothing pure Nothing

View file

@ -1,4 +1,4 @@
-- | `App.ZoneInterface` provides an interface to display and modify a DNS zone. -- | `App.Page.Zone` provides an interface to display and modify a DNS zone.
-- | -- |
-- | This interface enables to: -- | This interface enables to:
-- | - display all resource records of a zone (SOA, NS, A, AAAA, CNAME, TXT, MX, SRV) -- | - display all resource records of a zone (SOA, NS, A, AAAA, CNAME, TXT, MX, SRV)
@ -74,7 +74,7 @@ type RRId = Int
id :: forall a. a -> a id :: forall a. a -> a
id x = x id x = x
-- | `App.ZoneInterface` can send messages through websocket interface -- | `App.Page.Zone` can send messages through websocket interface
-- | connected to dnsmanagerd. See `App.WS`. -- | connected to dnsmanagerd. See `App.WS`.
-- | -- |
-- | Also, this component can log messages and ask its parent (`App.Container`) to -- | Also, this component can log messages and ask its parent (`App.Container`) to
@ -85,14 +85,14 @@ data Output
| Log LogMessage | Log LogMessage
| ToDomainList | ToDomainList
-- | `App.ZoneInterface` can receive messages from `dnsmanagerd`. -- | `App.Page.Zone` can receive messages from `dnsmanagerd`.
data Query a data Query a
= MessageReceived DNSManager.AnswerMessage a = MessageReceived DNSManager.AnswerMessage a
type Slot = H.Slot Query Output type Slot = H.Slot Query Output
-- | `App.ZoneInterface` has a single input: the domain name. -- | `App.Page.Zone` has a single input: the domain name.
type Input = String type Input = String
@ -753,7 +753,7 @@ handleAction = case _ of
DKIM -> H.modify_ _ { _currentRR = default_rr_DKIM } DKIM -> H.modify_ _ { _currentRR = default_rr_DKIM }
DMARC -> H.modify_ _ { _currentRR = default_rr_DMARC } DMARC -> H.modify_ _ { _currentRR = default_rr_DMARC }
-- | Initialize the ZoneInterface component: ask for the domain zone to `dnsmanagerd`. -- | Initialize the Zone component: ask for the domain zone to `dnsmanagerd`.
Initialize -> do Initialize -> do
{ _domain } <- H.get { _domain } <- H.get
H.raise $ Log $ SystemLog $ "Asking the domain " <> _domain H.raise $ Log $ SystemLog $ "Asking the domain " <> _domain
@ -1025,7 +1025,7 @@ handleQuery = case _ of
(DNSManager.MkZone response) -> do (DNSManager.MkZone response) -> do
add_entries response.zone.resources add_entries response.zone.resources
_ -> H.raise $ Log $ ErrorLog $ "Message not handled in ZoneInterface." _ -> H.raise $ Log $ ErrorLog $ "Message not handled in Page.Zone."
pure (Just a) pure (Just a)
where where