@deveodk/vue-online

An easy way to show if a users browser is online, with support for custom notification drivers. Inspired by Sopamo/vue-online.
1,682 4
Install
npm install @deveodk/vue-online
Latest Version:1.0.2
Vue:2
License:MIT
Last Updated:Jun 5, 2017
Links: GitHub  ·  npm
Maintainer: deveodk

@deveodk/vueOnline

npm vue2

An easy way to show if a users browser is online, with support for custom notification drivers. Inspired by Sopamo/vue-online.

Demo

See a functioning demo deveo demo site

Installation

npm install --save @deveodk/vue-online

Bundler (Webpack, Rollup)

import Vue from 'vue'
import vueOnline from '@deveodk/vue-online'
Vue.use(vueOnline)

Browser

<!-- From CDN -->
<script src="https://unpkg.com/@deveodk/vue-online"></script>

Usage

The package provides multiple options to notfiy if a users browser is online. The easiest way is to let the plugin do it automaticly.

Using @deveodk/vue-toastr driver
# Using the default notification
import online from '@deveodk/vue-online'
Vue.use(online, {
    notifier: require('@deveodk/vue-online/drivers/deveoToastr.js'),
    defaultOnlineTitle: 'Online',
    defaultOnlineMessage: 'You are online',
    defaultOfflineTitle: 'Offline',
    defaultOffilneMessage: 'You are offline'
})

Extending the functionality on your own
# The plugin comes with a build in mixin that allows you to make your own functionality
  import {VueOnline} from '@deveodk/vue-online'
  export default {
      mixins: [VueOnline]
  }

This will give you a reactive variable {{VueOnline}} the variable is either true for online, or false for offline

License

MIT

Related Packages

@deveodk/vue-error-tracker

Give your users an easy way to see when something in your application goes wrong...

529 7
vue-json-tree-view

a JSON Tree View Component in Vue.js

380,792 473
@v-c/picker

picker ui component for vue

57,185 32
vue-frame-crm

vue components for crm system

15,005
kokk

A beautiful way to create a documentation from markdown, and insert a vue compon...

10,142 49

Version History

Version Released Vue License
1.0.2 ^2.3.0 MIT
1.0.1 ^2.3.0 MIT
1.0.0 ^2.3.0 MIT