Skip to content

francocatena/meteor-status

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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