2019-02-05 18:17:36 +01:00
|
|
|
import Vue from 'vue'
|
|
|
|
|
import { Component } from 'vue-property-decorator'
|
|
|
|
|
import { UserStore } from '@store'
|
|
|
|
|
import { EventBus, RootState, storeBuilder, DebugMode } from '@store'
|
|
|
|
|
import router from './router'
|
|
|
|
|
|
|
|
|
|
import $ from 'jquery'
|
|
|
|
|
|
|
|
|
|
import Header from './components/Header.vue'
|
|
|
|
|
|
|
|
|
|
import globalroutines from './globalroutines/index'
|
2019-02-08 17:10:25 +01:00
|
|
|
import { GlobalStore } from './store/Modules'
|
2019-02-05 18:17:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
components: {
|
|
|
|
|
appHeader: Header
|
|
|
|
|
},
|
|
|
|
|
router
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default class App extends Vue {
|
|
|
|
|
public backgroundColor = 'whitesmoke'
|
|
|
|
|
public $q
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
created() {
|
|
|
|
|
if (process.env.DEV) {
|
|
|
|
|
console.info('SESSIONE IN SVILUPPO ! (DEV)')
|
|
|
|
|
console.info(process.env)
|
|
|
|
|
}
|
|
|
|
|
if (process.env.PROD) {
|
|
|
|
|
console.info('SESSIONE IN PRODUZIONE!')
|
2019-02-08 17:10:25 +01:00
|
|
|
// console.info(process.env)
|
2019-02-05 18:17:36 +01:00
|
|
|
}
|
|
|
|
|
|
2019-02-09 18:04:49 +01:00
|
|
|
UserStore.actions.autologin_FromLocalStorage()
|
|
|
|
|
.then((loadstorage) => {
|
|
|
|
|
if (loadstorage) {
|
2019-02-05 18:17:36 +01:00
|
|
|
globalroutines(this, 'loadapp', '')
|
|
|
|
|
// this.$router.replace('/')
|
|
|
|
|
|
|
|
|
|
// Create Subscription to Push Notification
|
|
|
|
|
GlobalStore.actions.createPushSubscription()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
2019-02-09 18:04:49 +01:00
|
|
|
// Calling the Server for updates ?
|
|
|
|
|
// Check the verified_email
|
|
|
|
|
|
2019-02-05 18:17:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|