From 4ed6287e5c939db6da4c4fbcb82089df3b539eb7 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Tue, 3 Dec 2024 13:01:13 +0100 Subject: [PATCH] URLs for websockets are now separated from the code. --- src/App/Container.purs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/App/Container.purs b/src/App/Container.purs index c515d4f..56aba9c 100644 --- a/src/App/Container.purs +++ b/src/App/Container.purs @@ -110,6 +110,9 @@ foreign import unsafeSetInnerHTML :: HTMLElement -> RawHTML -> Effect Unit -- | Current limit is 30 minutes (`max_keepalive` = 60, 60 * 30 seconds = 30 minutes). max_keepalive = 60 :: Int +wsURLauthd = "wss://netlib.re/ws/authd" :: String +wsURLdnsmanagerd = "wss://netlib.re/ws/dnsmanagerd" :: String + data Action = Initialize @@ -347,10 +350,10 @@ render state then HH.div_ [] else Bulma.btn_ [C.is_large, C.is_danger] "You have been disconnected. Click here to reconnect." Reconnection render_auth_WS :: forall monad. MonadAff monad => H.ComponentHTML Action ChildSlots monad - render_auth_WS = HH.slot _ws_auth unit WS.component (Tuple "wss://beta.netlib.re/ws/authd" "authd") AuthenticationDaemonEvent + render_auth_WS = HH.slot _ws_auth unit WS.component (Tuple wsURLauthd "authd") AuthenticationDaemonEvent render_dnsmanager_WS :: forall monad. MonadAff monad => H.ComponentHTML Action ChildSlots monad - render_dnsmanager_WS = HH.slot _ws_dns unit WS.component (Tuple "wss://beta.netlib.re/ws/dnsmanagerd" "dnsmanagerd") DNSManagerDaemonEvent + render_dnsmanager_WS = HH.slot _ws_dns unit WS.component (Tuple wsURLdnsmanagerd "dnsmanagerd") DNSManagerDaemonEvent render_notifications = case state.notif of