0.1.0 • Published 6 years ago

vue-network-status v0.1.0

Weekly downloads
5
License
-
Repository
-
Last release
6 years ago

vue-network-status

This library provides two VueJS components:

OnlineStatus: Shows an icon with tooltip representing if the client is currently online or offline.

NetworkInfo: Shows metrics about the internet connection using the browser Network Information API. Currently browser support is limited. I found that Chrome for Android works best.

Installation

npm i --save vue-network-status

Usage

Import the desired components

import {NetworkInfo, OnlineStatus} from 'vue-network-status';

Register them in your component

export default {
  name: 'app',
  components: {
    NetworkInfo,
    OnlineStatus,
    HelloWorld,
  },
};

Add them in your html section

<NetworkInfo/>
<OnlineStatus/>

More example code can be found in App.vue

Development & Demo

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your tests

npm run test

Lints and fixes files

npm run lint