Git Product home page Git Product logo

meteor-status's Introduction

Meteor Status

What is it?

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:

Meteor Status screenshot

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).

Installation

Add the package in your Meteor application with this command:

meteor add 255kb:meteor-status

Usage

Add the template before the body closing tag or anywhere else if you use the option style=false (see below):

<body>
    ...
    {{> meteorStatus}}
</body>

Options

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')

  • position='top': change positioning for styled version ('top' or 'bottom', default to bottom)

    ... {{> meteorStatus style=false lang='fr' position='top'}}

Changelog

v1.2.0:

  • 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

v1.3.0:

  • 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)

meteor-status's People

Contributors

255kb avatar kristerv avatar

Watchers

蹬 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.