build:v1.3.3; workflow: added vue-composition-api; feat: moved app status to about page, this closes #6; chore: removed style scripts from package.json

This commit is contained in:
Roberto Tonino
2020-11-10 22:56:22 +01:00
parent 6c32367c80
commit 351cd2d626
13 changed files with 98 additions and 84 deletions

13
src/use/online.js Normal file
View File

@@ -0,0 +1,13 @@
import { ref } from '@vue/composition-api'
const isOnline = ref(navigator.onLine)
window.addEventListener('online', () => {
isOnline.value = true
})
window.addEventListener('offline', () => {
isOnline.value = false
})
export const useOnline = () => ({ isOnline })