vue-connection-listener
Whenever the navigator's connection status changes a 'connection' event is emitted with a boolean payload indicating the new state (online = true, offline = false).
Installation
Setup & example
main.js
Inside any component
Notes
You need to import your own event bus and then inject it as a dependency.
Creating a bus could be as simple as creating a bus.js file with the following contents: