Module

Monitors.Activity

Package
purescript-activity-monitor
Repository
collegevine/purescript-activity-monitor

#InactivityWindow Source

newtype InactivityWindow

A session becomes inactive once the inactivity window has elapsed.

Constructors

#InactivityCallback Source

newtype InactivityCallback

A side effect performed if/when the activity monitor times out.

Constructors

#MonitoredEvent Source

data MonitoredEvent

The events which constitute "activity". There is a default set consisting of: window.load, document.click, document.mouseMove, document.keypress

Constructors

#start Source

start :: InactivityCallback -> InactivityWindow -> Effect Unit

Starts a new timer with the default 'MonitoredEvent's. See above for the specifc events.

#start' Source

start' :: String -> InactivityCallback -> InactivityWindow -> Array MonitoredEvent -> Effect Unit

A fully-configurable version of 'start'. If you wanted to trigger an inactivity callback based on the last time someone liked something on Facebook, you can do that.

#reset Source

reset :: Effect Unit

Manually reset the logout timer.