Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn when offline #9

Open
madeleineostoja opened this issue Feb 19, 2017 · 0 comments
Open

Warn when offline #9

madeleineostoja opened this issue Feb 19, 2017 · 0 comments
Assignees

Comments

@madeleineostoja
Copy link

Simpla-admin should show a persistent warning banner when the user is in edit mode and have dropped their connection, and not allow them to try and save until they’re back online.

Can do this with navigator online/offline API

console.log(navigator.onLine)
// Current status (true/false)

window.addEventListener('online', e => {
  // User is online
});

window.addEventListener('offline', e => {
  // User is offline
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant