Meteor Status is a package which automatically alerts users when the connection to the server has been lost. It also shows a countdown (in seconds) until the next retry and allows users to manually retry in the meantime.
The alert is fixed at the bottom of the screen and the design is based on Google's Material Design snackbars.
Here is how it looks like:
This package should be compatible with packages like Smart Disconnect as the alert does not show up in case of a manual disconnect (triggered with Meteor.disconnect()
).
Also, the first connection attempt (when the application is loaded for the first time) only shows the alert message on mobile (Cordova).
Add the package in your Meteor application with this command:
meteor add 255kb:meteor-status
Add the template before the body
closing tag or anywhere else if you use the option style=false
(see below):
<body>
...
{{> meteorStatus}}
</body>
You can add the following options to the template:
-
style=false
: remove style/UI/positioning (only displays the text and the link) -
lang='en'
: change language (currently 'fr' and 'en' supported, default to 'en') -
... {{> meteorStatus style=false lang='fr' position='top'}}position='top'
: change positioning for styled version ('top' or 'bottom', default to bottom)
- Improved default design (font and link style)
- Option to disable UI/design (text only)
- switch to local reactive vars instead of session vars
- added i18n support and French language
- package rewritten to allow multiple instances, also lighter
- no more jquery dependency
- higher z-index for styled version
- ability to position to top
- lighter unstyled version (text only, no wrapping div)