Scrolling works when a disconnection occurs.

beta
Philippe Pittoli 2024-11-13 02:46:57 +01:00
parent 346a23b8f7
commit 89f306ed47
1 changed files with 4 additions and 0 deletions

View File

@ -66,6 +66,8 @@ import App.Message.AuthenticationDaemon as AuthD
import App.Log as AppLog import App.Log as AppLog
import App.WS as WS import App.WS as WS
import Scroll (scrollToTop)
import App.Page.Authentication as AI import App.Page.Authentication as AI
import App.Page.Registration as RI import App.Page.Registration as RI
import App.Page.MailValidation as MVI import App.Page.MailValidation as MVI
@ -524,6 +526,7 @@ handleAction = case _ of
WS.WSJustClosed -> do WS.WSJustClosed -> do
H.modify_ _ { are_we_connected_to_dnsmanagerd = false } H.modify_ _ { are_we_connected_to_dnsmanagerd = false }
H.liftEffect scrollToTop
handleAction $ Log $ ErrorLog "You just got disconnected from authd." handleAction $ Log $ ErrorLog "You just got disconnected from authd."
WS.Log message -> handleAction $ Log message WS.Log message -> handleAction $ Log message
WS.KeepAlive -> handleAction $ KeepAlive $ Left unit WS.KeepAlive -> handleAction $ KeepAlive $ Left unit
@ -708,6 +711,7 @@ handleAction = case _ of
handleAction AuthenticateToDNSManager handleAction AuthenticateToDNSManager
WS.WSJustClosed -> do WS.WSJustClosed -> do
H.modify_ _ { are_we_connected_to_dnsmanagerd = false } H.modify_ _ { are_we_connected_to_dnsmanagerd = false }
H.liftEffect scrollToTop
handleAction $ Log $ ErrorLog "You just got disconnected from dnsmanagerd." handleAction $ Log $ ErrorLog "You just got disconnected from dnsmanagerd."
WS.Log message -> handleAction $ Log message WS.Log message -> handleAction $ Log message
WS.KeepAlive -> handleAction $ KeepAlive $ Right unit WS.KeepAlive -> handleAction $ KeepAlive $ Right unit