Some name changes (+ fix).
This commit is contained in:
parent
fb7c07e64d
commit
d99e38d1b8
@ -10,9 +10,9 @@ import App.AuthenticationForm as AF
|
|||||||
import App.Log as Log
|
import App.Log as Log
|
||||||
import App.WS as WS
|
import App.WS as WS
|
||||||
import App.AuthenticationDaemonAdminInterface as AAI
|
import App.AuthenticationDaemonAdminInterface as AAI
|
||||||
import App.DomainListInterface as DomainListInterface
|
import App.DomainListInterface as DomainListInterface
|
||||||
import Halogen as H
|
import Halogen as H
|
||||||
import HalogenEvent.HTML as HH
|
import Halogen.HTML as HH
|
||||||
import Type.Proxy (Proxy(..))
|
import Type.Proxy (Proxy(..))
|
||||||
import Effect.Aff.Class (class MonadAff)
|
import Effect.Aff.Class (class MonadAff)
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ type ChildSlots =
|
|||||||
, ws_dns :: WS.Slot Unit
|
, ws_dns :: WS.Slot Unit
|
||||||
, af :: AF.Slot Unit
|
, af :: AF.Slot Unit
|
||||||
, aai :: AAI.Slot Unit
|
, aai :: AAI.Slot Unit
|
||||||
, ndi :: DomainListInterface.Slot Unit
|
, dli :: DomainListInterface.Slot Unit
|
||||||
)
|
)
|
||||||
|
|
||||||
_log = Proxy :: Proxy "log"
|
_log = Proxy :: Proxy "log"
|
||||||
@ -41,7 +41,7 @@ _ws_auth = Proxy :: Proxy "ws_auth"
|
|||||||
_ws_dns = Proxy :: Proxy "ws_dns"
|
_ws_dns = Proxy :: Proxy "ws_dns"
|
||||||
_af = Proxy :: Proxy "af"
|
_af = Proxy :: Proxy "af"
|
||||||
_aai = Proxy :: Proxy "aai"
|
_aai = Proxy :: Proxy "aai"
|
||||||
_ndi = Proxy :: Proxy "ndi"
|
_dli = Proxy :: Proxy "dli"
|
||||||
|
|
||||||
component :: forall q i o m. MonadAff m => H.Component q i o m
|
component :: forall q i o m. MonadAff m => H.Component q i o m
|
||||||
component =
|
component =
|
||||||
@ -87,13 +87,13 @@ render state
|
|||||||
[ Bulma.h1 "Administrative interface for authd"
|
[ Bulma.h1 "Administrative interface for authd"
|
||||||
, HH.slot _aai unit AAI.component unit AuthenticationDaemonAdminComponentEvent
|
, HH.slot _aai unit AAI.component unit AuthenticationDaemonAdminComponentEvent
|
||||||
]
|
]
|
||||||
NothingEvent -> render_nothing
|
Nothing -> render_nothing
|
||||||
|
|
||||||
render_newdomain_interface :: forall monad. MonadAff monad => H.ComponentHTML Action ChildSlots monad
|
render_newdomain_interface :: forall monad. MonadAff monad => H.ComponentHTML Action ChildSlots monad
|
||||||
render_newdomain_interface = case state.token of
|
render_newdomain_interface = case state.token of
|
||||||
Just token -> Bulma.box $
|
Just token -> Bulma.box $
|
||||||
[ Bulma.h1 "New domain interface!"
|
[ Bulma.h1 "New domain interface!"
|
||||||
, HH.slot _ndi unit DomainListInterface.component token NewDomainComponentEvent
|
, HH.slot _dli unit DomainListInterface.component token NewDomainComponentEvent
|
||||||
]
|
]
|
||||||
Nothing -> render_nothing
|
Nothing -> render_nothing
|
||||||
|
|
||||||
@ -139,9 +139,9 @@ handleAction = case _ of
|
|||||||
WS.UnableToSend msg -> H.tell _log unit (Log.UnableToSend msg)
|
WS.UnableToSend msg -> H.tell _log unit (Log.UnableToSend msg)
|
||||||
|
|
||||||
DNSManagerDaemonEvent ev -> case ev of
|
DNSManagerDaemonEvent ev -> case ev of
|
||||||
WS.MessageReceived (Tuple _ message) -> H.tell _ndi unit (DomainListInterface.MessageReceived message)
|
WS.MessageReceived (Tuple _ message) -> H.tell _dli unit (DomainListInterface.MessageReceived message)
|
||||||
WS.WSJustConnected -> H.tell _ndi unit DomainListInterface.ConnectionIsUp
|
WS.WSJustConnected -> H.tell _dli unit DomainListInterface.ConnectionIsUp
|
||||||
WS.WSJustClosed -> H.tell _ndi unit DomainListInterface.ConnectionIsDown
|
WS.WSJustClosed -> H.tell _dli unit DomainListInterface.ConnectionIsDown
|
||||||
WS.AppendMessage msg -> H.tell _log unit (Log.SimpleLog msg)
|
WS.AppendMessage msg -> H.tell _log unit (Log.SimpleLog msg)
|
||||||
WS.AppendSystemMessage msg -> H.tell _log unit (Log.SystemLog msg)
|
WS.AppendSystemMessage msg -> H.tell _log unit (Log.SystemLog msg)
|
||||||
WS.UnableToSend msg -> H.tell _log unit (Log.UnableToSend msg)
|
WS.UnableToSend msg -> H.tell _log unit (Log.UnableToSend msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user