At last, some documentation. Just a scratch on the surface.
parent
05f256b4e8
commit
367e914fc7
|
@ -1,3 +1,4 @@
|
||||||
|
-- | `App.AuthenticationForm` is both the authentication and registration interface.
|
||||||
module App.AuthenticationForm where
|
module App.AuthenticationForm where
|
||||||
|
|
||||||
import Prelude (Unit, bind, discard, pure, ($), (<<<), (<>))
|
import Prelude (Unit, bind, discard, pure, ($), (<<<), (<>))
|
||||||
|
@ -21,11 +22,19 @@ import App.Email as Email
|
||||||
import App.LogMessage
|
import App.LogMessage
|
||||||
import App.Messages.AuthenticationDaemon as AuthD
|
import App.Messages.AuthenticationDaemon as AuthD
|
||||||
|
|
||||||
|
-- | The component can inform the parent (`App.Container`) that the authentication is complete,
|
||||||
|
-- | and share both the uid and token. The token is useful to authenticate the user to the
|
||||||
|
-- | dnsmanager daemon.
|
||||||
|
-- |
|
||||||
|
-- | Also, the component can send a message to a websocket and log messages.
|
||||||
data Output
|
data Output
|
||||||
= AuthToken (Tuple Int String)
|
= AuthToken (Tuple Int String)
|
||||||
| MessageToSend ArrayBuffer
|
| MessageToSend ArrayBuffer
|
||||||
| Log LogMessage
|
| Log LogMessage
|
||||||
|
|
||||||
|
-- | The component's parent provides received messages.
|
||||||
|
-- |
|
||||||
|
-- | Also, the component is informed when the connection went up or down.
|
||||||
data Query a
|
data Query a
|
||||||
= MessageReceived ArrayBuffer a
|
= MessageReceived ArrayBuffer a
|
||||||
| ConnectionIsDown a
|
| ConnectionIsDown a
|
||||||
|
|
Loading…
Reference in New Issue