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.
npm i --save vue-network-status
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
npm install
npm run serve
npm run build
npm run test
npm run lint