Messages are sent and received, but something fails.
parent
7dc993ae26
commit
b20504dfb9
|
@ -67,9 +67,9 @@ render state
|
||||||
|
|
||||||
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 = Bulma.box $ case state.token of
|
render_newdomain_interface = Bulma.box $ case state.token of
|
||||||
Just _ ->
|
Just token ->
|
||||||
[ Bulma.h1 "New domain interface!"
|
[ Bulma.h1 "New domain interface!"
|
||||||
, HH.slot_ _ndi unit NewDomainInterface.component "ws://127.0.0.1:8081"
|
, HH.slot_ _ndi unit NewDomainInterface.component (Tuple "ws://127.0.0.1:8081" token)
|
||||||
]
|
]
|
||||||
Nothing -> [ Bulma.p "Here will be the new domain box." ]
|
Nothing -> [ Bulma.p "Here will be the new domain box." ]
|
||||||
|
|
||||||
|
|
|
@ -287,7 +287,6 @@ handleAction = case _ of
|
||||||
H.liftEffect $ WS.setBinaryType webSocket ArrayBuffer
|
H.liftEffect $ WS.setBinaryType webSocket ArrayBuffer
|
||||||
H.modify_ _ { wsConnection = Just webSocket }
|
H.modify_ _ { wsConnection = Just webSocket }
|
||||||
void $ H.subscribe (HandleWebSocket <$> webSocketEmitter webSocket)
|
void $ H.subscribe (HandleWebSocket <$> webSocketEmitter webSocket)
|
||||||
handleAction AuthenticateToDNSManager
|
|
||||||
|
|
||||||
AuthenticateToDNSManager -> do
|
AuthenticateToDNSManager -> do
|
||||||
{ wsConnection, token } <- H.get
|
{ wsConnection, token } <- H.get
|
||||||
|
@ -372,6 +371,7 @@ handleAction = case _ of
|
||||||
WebSocketOpen -> do
|
WebSocketOpen -> do
|
||||||
{ wsUrl } <- H.get
|
{ wsUrl } <- H.get
|
||||||
systemMessage ("Successfully connected to WebSocket at \"" <> wsUrl <> "\"!🎉")
|
systemMessage ("Successfully connected to WebSocket at \"" <> wsUrl <> "\"!🎉")
|
||||||
|
handleAction AuthenticateToDNSManager
|
||||||
|
|
||||||
WebSocketClose { code, reason, wasClean } -> do
|
WebSocketClose { code, reason, wasClean } -> do
|
||||||
systemMessage $ renderCloseMessage code wasClean reason
|
systemMessage $ renderCloseMessage code wasClean reason
|
||||||
|
|
Loading…
Reference in New Issue