mininao / meteor-status

Display the connection status with the server in Meteor applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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_foundation">
</template>

And then use it like this:

Status.setTemplate('foundation')

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

About

Display the connection status with the server in Meteor applications

License:MIT License


Languages

Language:JavaScript 74.3%Language:HTML 25.7%