Created Test Environment test.freeplanet.app
and Server: /var/www/test.freeplanet_server
This commit is contained in:
84
src/App.ts
84
src/App.ts
@@ -7,6 +7,7 @@ import { useUserStore } from '@store/UserStore'
|
||||
import { Header } from '@/components/Header'
|
||||
import { computed } from 'vue'
|
||||
import { CProvaPao } from '@/components/CProvaPao'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -38,50 +39,59 @@ export default {
|
||||
}
|
||||
|
||||
function created() {
|
||||
if (process.env.DEV) {
|
||||
console.info('SESSIONE IN SVILUPPO ! (DEV)')
|
||||
// console.info(process.env)
|
||||
}
|
||||
if (process.env.PROD) {
|
||||
console.info('SESSIONE IN PRODUZIONE!')
|
||||
// console.info(process.env)
|
||||
}
|
||||
|
||||
// Make autologin only if some routing
|
||||
|
||||
// console.log('window.location.href', window.location.href)
|
||||
|
||||
let chiamaautologin = true
|
||||
listaRoutingNoLogin.forEach((mystr) => {
|
||||
if (window.location.href.includes(mystr)) {
|
||||
chiamaautologin = false
|
||||
try {
|
||||
if (process.env.DEV) {
|
||||
console.info('SESSIONE IN SVILUPPO ! (DEV)')
|
||||
// console.info(process.env)
|
||||
}
|
||||
if (tools.isTest()) {
|
||||
console.info('SESSIONE IN TEST ! (TEST)')
|
||||
} else {
|
||||
if (process.env.PROD) {
|
||||
console.info('SESSIONE IN PRODUZIONE!')
|
||||
// console.info(process.env)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
if (chiamaautologin) {
|
||||
// console.log('CHIAMA autologin_FromLocalStorage')
|
||||
userStore.autologin_FromLocalStorage($router)
|
||||
.then((loadstorage: any) => {
|
||||
if (loadstorage) {
|
||||
|
||||
|
||||
/*if (toolsext.getLocale() !== '') {
|
||||
// console.log('SETLOCALE :', this.$i18n.locale)
|
||||
$i18n.locale = toolsext.getLocale() // Set Lang
|
||||
} else {
|
||||
userStore.setlang($router, this.$i18n.locale)
|
||||
}*/
|
||||
// Make autologin only if some routing
|
||||
|
||||
// console.log('window.location.href', window.location.href)
|
||||
|
||||
let chiamaautologin = true
|
||||
listaRoutingNoLogin.forEach((mystr) => {
|
||||
if (window.location.href.includes(mystr)) {
|
||||
chiamaautologin = false
|
||||
}
|
||||
})
|
||||
|
||||
if (chiamaautologin) {
|
||||
// console.log('CHIAMA autologin_FromLocalStorage')
|
||||
userStore.autologin_FromLocalStorage($router)
|
||||
.then((loadstorage: any) => {
|
||||
if (loadstorage) {
|
||||
|
||||
|
||||
// console.log('lang CARICATO:', this.$i18n.locale)
|
||||
/*if (toolsext.getLocale() !== '') {
|
||||
// console.log('SETLOCALE :', this.$i18n.locale)
|
||||
$i18n.locale = toolsext.getLocale() // Set Lang
|
||||
} else {
|
||||
userStore.setlang($router, this.$i18n.locale)
|
||||
}*/
|
||||
|
||||
//++Todo PWA: globalroutines('loadapp', '')
|
||||
|
||||
// Create Subscription to Push Notification
|
||||
globalStore.createPushSubscription()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// console.log('lang CARICATO:', this.$i18n.locale)
|
||||
|
||||
//++Todo PWA: globalroutines('loadapp', '')
|
||||
|
||||
// Create Subscription to Push Notification
|
||||
globalStore.createPushSubscription()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
globalStore.finishLoading = true
|
||||
}
|
||||
} catch (e) {
|
||||
globalStore.finishLoading = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user