Display the connection status with the server in Meteor applications
JavaScript HTML
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
i18n
lib Remove tap:i18n customizations (fix #22) Sep 30, 2015
templates
test
.gitignore
.versions
LICENSE
README.md
package.js
status.js
versions.json

README.md

Meteor status

Display the app connection status with the server

Installation

$ meteor add francocatena:status

Usage

Just insert {{> status}} and you are ready

This is what it looks like when the connection between the server and the client is lost:

Disconnected status in english

Templates

The status component can be generated using a specific template by providing a template name

Meteor.startup(function () {
  Status.setTemplate('semantic_ui')
})

Available templates

Creating a custom template

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

Translate

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à:

Disconnected status in french

Available translations

Contributors