- cleaned some code.

- routing offline
- pushNotification
This commit is contained in:
Paolo Arena
2019-02-12 12:06:01 +01:00
parent e755ada1ff
commit a024b78e95
21 changed files with 560 additions and 247 deletions

View File

@@ -182,10 +182,10 @@
}
create () {
mounted () {
// Test this by running the code snippet below and then
// use the "Offline" checkbox in DevTools Network panel
// use the "Offline" checkbox in DevTools Network panel
let mythis = this
console.log('Event LOAD')
@@ -195,12 +195,12 @@
function updateOnlineStatus(event) {
if (navigator.onLine) {
console.log('ONLINE!')
console.log('EVENT ONLINE!')
// handle online status
GlobalStore.mutations.setStateConnection('online')
mythis.changeIconConn()
} else {
console.log('OFFLINE!')
console.log('EVENT OFFLINE!')
// handle offline status
GlobalStore.mutations.setStateConnection('offline')
mythis.changeIconConn()