Display the app connection status with the server
$ meteor add francocatena:status
Just insert {{> status}}
and you are ready
This is what it looks like when the connection between the server and the client is lost:
The status component can be generated using a specific template by providing a template name
Meteor.startup(function () {
Status.setTemplate('semantic_ui')
})
- bootstrap3 (default)
- semantic_ui (thanks Sivli Kestanous)
- materialize (thanks Gabriel)
- uikit (thanks hack1m)
- foundation (thanks hack1m)
To define a custom template simply create a template with the name 'status_' + templateName
For example:
<template name="status_skeleton">
</template>
And then use it like this:
Status.setTemplate('skeleton')
You can also set the main classes (or other options) in the provided templates
Status.setTemplate('bootstrap3', { classes: 'alert-danger' })
For examples see the templates folder
If you want to display the messages in another language
Meteor.startup(function () {
TAPi18n.setLanguage('fr')
})
If you are not using tap:i18n you should create an empty file for the language:
$ mkdir -p i18n && touch i18n/fr.i18n.json
And voilà:
- English (default)
- Spanish
- French (thanks to Arthur Tayrac and Maxence Aïci)
- Italian (thanks to alexdown)
- Turkish (thanks to fuatsengul)
- German (thanks to xanatas)
- Portuguese (thanks to Rodrigo Nascimento)
- Dutch (thanks to David Soff)
- Traditional Chinese (thanks to Henry Hsiao)
- Danish (thanks to 132041)
- Simplified Chinese (thanks to Bing Zou and Micjoyce)
- Czech (thanks to Rostislav Postrednik)
- Russian (thanks to navi8602)
- Malay (thanks to hack1m)
- Indonesian (thanks to hack1m)
- Vietnamese (thanks to phund)
- Estonian (thanks to Kris Haamer)