
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
vue-offline
Advanced tools
Oline/Offlien states for vue application[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dn[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[D[D[D[Dne[
This plugins notifies your application when online/offline status changes and allows to conditionally display components depending on the network status.
npm install vue-offline --save
import Vue from 'vue'
import VueOffline from 'vue-offline'
Vue.use(VueOffline)
v-online
directive - shows component only when onlinev-offline
directive - shows component only when offlineonline
event - available in every component, emitted when user changes from offline to onlineoffline
event - available in every component, emitted when user changes from online to offline<template>
<div id="app">
<div v-online>This part is visible only when user is online</div>
<div v-offline>This part is visible only if user is offline</div>
<div> {{ onlineState }} </div>
</div>
</template>
<script>
export default {
data () {
return {
onlineState: navigator.onLine
}
},
created () {
this.$on('online', function () {
this.onlineState = "I'm online now!"
})
this.$on('offline', function () {
this.onlineState = "I'm offline now!"
})
}
}
</script>
FAQs
Offline states and storage for Vue.js apps and Progressive Web Apps
The npm package vue-offline receives a total of 1,313 weekly downloads. As such, vue-offline popularity was classified as popular.
We found that vue-offline demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.