Clear all stored session data when user disconnects himself.
parent
abf03de8c9
commit
b6655a0ee0
|
@ -463,11 +463,10 @@ handleAction = case _ of
|
||||||
|
|
||||||
Disconnection -> do
|
Disconnection -> do
|
||||||
H.put $ initialState unit
|
H.put $ initialState unit
|
||||||
|
|
||||||
|
-- Remove all stored session data.
|
||||||
sessionstorage <- H.liftEffect $ Window.sessionStorage =<< HTML.window
|
sessionstorage <- H.liftEffect $ Window.sessionStorage =<< HTML.window
|
||||||
_ <- H.liftEffect $ Storage.removeItem "user-authd-token" sessionstorage
|
H.liftEffect $ Storage.clear sessionstorage
|
||||||
_ <- H.liftEffect $ Storage.removeItem "current-page" sessionstorage
|
|
||||||
_ <- H.liftEffect $ Storage.removeItem "current-zone" sessionstorage
|
|
||||||
handleAction $ Routing Home
|
|
||||||
|
|
||||||
-- TODO: depending on the current page, we should provide the received message to different components.
|
-- TODO: depending on the current page, we should provide the received message to different components.
|
||||||
DNSManagerDaemonEvent ev -> case ev of
|
DNSManagerDaemonEvent ev -> case ev of
|
||||||
|
|
Loading…
Reference in New Issue