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

Notify of disconnect #8

Open
janat08 opened this issue Sep 11, 2017 · 7 comments
Open

Notify of disconnect #8

janat08 opened this issue Sep 11, 2017 · 7 comments

Comments

@janat08
Copy link

janat08 commented Sep 11, 2017

Would be cool to have ui with the logic to have user know that he's disconnected.

@ejfrancis
Copy link

ejfrancis commented Sep 11, 2017

+1 something like this would be great, and easy to implement

import { SmartDisconnect } from 'meteor/mixmax:smart-disconnect'

SmartDisconnect.on('disconnect', () => {
   alert('You have been disconnected because you weren\'t viewing the page');
});
SmartDisconnect.on('reconnect', () => {
   alert('You have been reconnected');
});

@janat08
Copy link
Author

janat08 commented Sep 11, 2017

Providing a hook may be better with alert in case you decide to get fancy with bert pack of notifications. I don't belief it automatically reconnects you, so using a menu with button for reconnecting may be better.

@janat08
Copy link
Author

janat08 commented Sep 11, 2017

It also just occured to me that it should probably not enable for development environment.

@ejfrancis
Copy link

it looks like it should reconnect

@janat08
Copy link
Author

janat08 commented Sep 11, 2017

notifying of reconnect would be helpful for the sake of lag, while disconnect message then is somewhat pointless then?

@ejfrancis
Copy link

actually, it looks like perhaps this can be covered by simply listening to the reactive data source Meteor.status() https://docs.meteor.com/api/connections.html

@bradvogel
Copy link
Contributor

sounds good - file a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants