add some env
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
APP_VERSION="0.0.53"
|
APP_VERSION="0.0.54"
|
||||||
|
APP_NAME="FreePlanet"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="1"
|
APP_ID="1"
|
||||||
APP_URL="https://freeplanet.app"
|
APP_URL="https://freeplanet.app"
|
||||||
|
URL_FACEBOOK="https://www.facebook.com/freeplanetapp"
|
||||||
PROVA_PAOLO="PROVA SVILUPPO"
|
PROVA_PAOLO="PROVA SVILUPPO"
|
||||||
LANG_DEFAULT="it"
|
LANG_DEFAULT="it"
|
||||||
PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
|
PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="q-app">
|
<div id="q-app">
|
||||||
<div class="q-pa-xs">
|
<div>
|
||||||
<q-layout view="hHh Lpr lff" class="shadow-2 rounded-borders">
|
<q-layout view="hHh Lpr lff" class="shadow-2 rounded-borders">
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<q-ajax-bar></q-ajax-bar>
|
<q-ajax-bar></q-ajax-bar>
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export default class Header extends Vue {
|
|||||||
public clCloudDown_Indexeddb: string = 'clIndexeddbsend'
|
public clCloudDown_Indexeddb: string = 'clIndexeddbsend'
|
||||||
public right: boolean = false
|
public right: boolean = false
|
||||||
public photo = ''
|
public photo = ''
|
||||||
|
public visuimg: boolean = true
|
||||||
|
|
||||||
public selectOpLang = [
|
public selectOpLang = [
|
||||||
{ label: 'English', icon: 'fa-flag-us', value: 'enUs', image: '../statics/images/gb.png', short: 'EN' },
|
{ label: 'English', icon: 'fa-flag-us', value: 'enUs', image: '../statics/images/gb.png', short: 'EN' },
|
||||||
@@ -289,6 +290,14 @@ export default class Header extends Vue {
|
|||||||
return '../../' + tools.getimglogo()
|
return '../../' + tools.getimglogo()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public toggleanimation() {
|
||||||
|
console.log('toggleanimation')
|
||||||
|
this.visuimg = false
|
||||||
|
setTimeout(() => {
|
||||||
|
this.visuimg = true
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
|
|
||||||
get MenuCollapse() {
|
get MenuCollapse() {
|
||||||
return GlobalStore.state.menuCollapse
|
return GlobalStore.state.menuCollapse
|
||||||
// return true
|
// return true
|
||||||
|
|||||||
@@ -120,21 +120,26 @@
|
|||||||
</q-drawer>
|
</q-drawer>
|
||||||
|
|
||||||
<q-drawer v-model="right" side="right" overlay bordered>
|
<q-drawer v-model="right" side="right" overlay bordered>
|
||||||
<div id="profile" v-if="Username">
|
<div id="profile">
|
||||||
<q-img class="absolute-top" src="https://cdn.quasar-framework.org/img/material.png" style="height: 150px">
|
<q-img class="absolute-top" src="https://cdn.quasar-framework.org/img/material.png"
|
||||||
|
style="height: 150px">
|
||||||
<div class="absolute-bottom bg-transparent">
|
<div class="absolute-bottom bg-transparent">
|
||||||
|
|
||||||
<q-avatar class="q-mb-sm">
|
<q-avatar class="q-mb-sm">
|
||||||
<img src="../../statics/images/avatar-1.svg">
|
<img src="../../statics/images/avatar-1.svg">
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
<div class="text-weight-bold">{{ Username }}</div>
|
<div v-if="Username" class="text-weight-bold">{{ Username }}</div>
|
||||||
|
<div v-else class="text-italic">{{ $t('user.loggati') }}</div>
|
||||||
|
|
||||||
<!--<span class="text-white" v-if="Verificato"> {{$t('reg.verificato')}} </span>-->
|
<!--<span class="text-white" v-if="Verificato"> {{$t('reg.verificato')}} </span>-->
|
||||||
<!--<span class="text-white background-red" v-else> {{$t('reg.non_verificato')}} </span>-->
|
<!--<span class="text-white background-red" v-else> {{$t('reg.non_verificato')}} </span>-->
|
||||||
<div id="user-actions">
|
|
||||||
|
<div v-if="Username" id="user-actions">
|
||||||
<q-btn round color="primary" icon="person"></q-btn>
|
<q-btn round color="primary" icon="person"></q-btn>
|
||||||
<q-btn round color="warning" icon="lock"></q-btn>
|
<q-btn round color="warning" icon="lock"></q-btn>
|
||||||
<q-btn round color="secondary" icon="exit_to_app" @click='logoutHandler'></q-btn>
|
<q-btn round color="secondary" icon="exit_to_app" @click='logoutHandler'></q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</q-img>
|
</q-img>
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,10 @@ export default class Home extends Vue {
|
|||||||
}, mytime)
|
}, mytime)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get appname() {
|
||||||
|
return process.env.APP_NAME
|
||||||
|
}
|
||||||
|
|
||||||
public beforeDestroy() {
|
public beforeDestroy() {
|
||||||
console.log('beforeDestroy')
|
console.log('beforeDestroy')
|
||||||
clearInterval(this.polling)
|
clearInterval(this.polling)
|
||||||
@@ -72,6 +76,10 @@ export default class Home extends Vue {
|
|||||||
return process.env.TELEGRAM_SUPPORT
|
return process.env.TELEGRAM_SUPPORT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get FBPage() {
|
||||||
|
return process.env.URL_FACEBOOK
|
||||||
|
}
|
||||||
|
|
||||||
public meta() {
|
public meta() {
|
||||||
return {
|
return {
|
||||||
keywords: { name: 'keywords', content: 'Quasar website' },
|
keywords: { name: 'keywords', content: 'Quasar website' },
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<div class="q-gutter-xs testo-banda clgutter">
|
<div class="q-gutter-xs testo-banda clgutter">
|
||||||
<div class="text-h1 shadow-max">FreePlanet</div>
|
<div class="text-h1 shadow-max">{{appname}}</div>
|
||||||
<div class="text-subtitle1 shadow text-italic q-pl-sm">
|
<div class="text-subtitle1 shadow text-italic q-pl-sm">
|
||||||
{{$t('msg.sottoTitoloApp')}}
|
{{$t('msg.sottoTitoloApp')}}
|
||||||
</div>
|
</div>
|
||||||
@@ -366,7 +366,7 @@
|
|||||||
<section class="landing__footer">
|
<section class="landing__footer">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<div class="landing__footer-icons row flex-center">
|
<div class="landing__footer-icons row flex-center">
|
||||||
<a href="https://www.facebook.com/freeplanetapp" target="_blank">
|
<a :href="FBPage" target="_blank">
|
||||||
<i aria-hidden="true" class="q-icon fab fa-facebook-f icon_contact"> </i></a>
|
<i aria-hidden="true" class="q-icon fab fa-facebook-f icon_contact"> </i></a>
|
||||||
|
|
||||||
<a :href="TelegramSupport" target="_blank">
|
<a :href="TelegramSupport" target="_blank">
|
||||||
|
|||||||
@@ -149,7 +149,8 @@ const messages = {
|
|||||||
error_doppiologin: 'Rieseguire il Login. Accesso aperto da un altro dispositivo.',
|
error_doppiologin: 'Rieseguire il Login. Accesso aperto da un altro dispositivo.',
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
notregistered: 'Devi registrarti al servizio prima di porter memorizzare i dati'
|
notregistered: 'Devi registrarti al servizio prima di porter memorizzare i dati',
|
||||||
|
loggati: 'Utente non loggato'
|
||||||
},
|
},
|
||||||
reg: {
|
reg: {
|
||||||
incorso: 'Registrazione in corso...',
|
incorso: 'Registrazione in corso...',
|
||||||
@@ -382,7 +383,8 @@ const messages = {
|
|||||||
error_doppiologin: 'Vuelva a iniciar sesión. Acceso abierto por otro dispositivo.',
|
error_doppiologin: 'Vuelva a iniciar sesión. Acceso abierto por otro dispositivo.',
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
notregistered: 'Debe registrarse en el servicio antes de poder almacenar los datos'
|
notregistered: 'Debe registrarse en el servicio antes de poder almacenar los datos',
|
||||||
|
loggati: 'Usuario no ha iniciado sesión'
|
||||||
},
|
},
|
||||||
reg: {
|
reg: {
|
||||||
incorso: 'Registro en curso...',
|
incorso: 'Registro en curso...',
|
||||||
@@ -608,7 +610,8 @@ const messages = {
|
|||||||
error_doppiologin: 'Signup again. Another access was made with another device.',
|
error_doppiologin: 'Signup again. Another access was made with another device.',
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
notregistered: 'You need first to SignUp before storing data'
|
notregistered: 'You need first to SignUp before storing data',
|
||||||
|
loggati: 'User not logged in'
|
||||||
},
|
},
|
||||||
reg: {
|
reg: {
|
||||||
incorso: 'Registration please wait...',
|
incorso: 'Registration please wait...',
|
||||||
|
|||||||
@@ -22,10 +22,16 @@ axiosInstance.interceptors.response.use(
|
|||||||
return response
|
return response
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
|
// console.log('error', error)
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
if (process.env.DEBUG === '1')
|
if (process.env.DEBUG === '1')
|
||||||
console.log(error.response.status)
|
console.log('Status = ', error.response.status)
|
||||||
console.log('Request Error: ', error.response)
|
console.log('Request Error: ', error.response)
|
||||||
|
if (error.response.status) {
|
||||||
|
GlobalStore.mutations.setStateConnection('online')
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
GlobalStore.mutations.setStateConnection('offline')
|
||||||
}
|
}
|
||||||
return Promise.reject(error)
|
return Promise.reject(error)
|
||||||
}
|
}
|
||||||
@@ -97,6 +103,7 @@ async function Request(type: string, path: string, payload: any): Promise<Types.
|
|||||||
'x-auth': UserStore.state.x_auth_token
|
'x-auth': UserStore.state.x_auth_token
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
ricevuto = true
|
||||||
return new Types.AxiosSuccess(response.data, response.status)
|
return new Types.AxiosSuccess(response.data, response.status)
|
||||||
} else if (type === 'postFormData') {
|
} else if (type === 'postFormData') {
|
||||||
response = await axiosInstance.post(path, payload, {
|
response = await axiosInstance.post(path, payload, {
|
||||||
@@ -105,6 +112,7 @@ async function Request(type: string, path: string, payload: any): Promise<Types.
|
|||||||
'x-auth': UserStore.state.x_auth_token
|
'x-auth': UserStore.state.x_auth_token
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
ricevuto = true
|
||||||
return new Types.AxiosSuccess(response.data, response.status)
|
return new Types.AxiosSuccess(response.data, response.status)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -120,7 +128,6 @@ async function Request(type: string, path: string, payload: any): Promise<Types.
|
|||||||
// console.log('ricevuto=', ricevuto)
|
// console.log('ricevuto=', ricevuto)
|
||||||
console.log('error.response=', error.response)
|
console.log('error.response=', error.response)
|
||||||
}
|
}
|
||||||
GlobalStore.mutations.setStateConnection(ricevuto ? 'online' : 'offline')
|
|
||||||
let mycode = 0
|
let mycode = 0
|
||||||
if (!ricevuto) {
|
if (!ricevuto) {
|
||||||
mycode = tools.ERR_SERVERFETCH
|
mycode = tools.ERR_SERVERFETCH
|
||||||
|
|||||||
@@ -130,7 +130,8 @@ namespace Getters {
|
|||||||
Dashboard: {
|
Dashboard: {
|
||||||
routes: [
|
routes: [
|
||||||
{ route: '/', faIcon: 'fa fa-home', materialIcon: 'home', name: 'pages.home' },
|
{ route: '/', faIcon: 'fa fa-home', materialIcon: 'home', name: 'pages.home' },
|
||||||
{ route: '/todo', faIcon: 'fa fa-list-alt', materialIcon: 'format_list_numbered', name: 'pages.Todo',
|
{
|
||||||
|
route: '/todo', faIcon: 'fa fa-list-alt', materialIcon: 'format_list_numbered', name: 'pages.Todo',
|
||||||
routes2: listatodo
|
routes2: listatodo
|
||||||
},
|
},
|
||||||
{ route: '/category', faIcon: 'fa fa-list-alt', materialIcon: 'category', name: 'pages.Category' },
|
{ route: '/category', faIcon: 'fa fa-list-alt', materialIcon: 'category', name: 'pages.Category' },
|
||||||
@@ -408,13 +409,9 @@ namespace Actions {
|
|||||||
async function deleteSubscriptionToServer(context) {
|
async function deleteSubscriptionToServer(context) {
|
||||||
console.log('DeleteSubscriptionToServer: ')
|
console.log('DeleteSubscriptionToServer: ')
|
||||||
|
|
||||||
return await fetch(process.env.MONGODB_HOST + '/subscribe/del', {
|
return Api.SendReq('/subscribe/del', 'DELETE', null)
|
||||||
method: 'DELETE',
|
.then((res) => {
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
'Accept': 'application/json',
|
|
||||||
'x-auth': UserStore.state.x_auth_token
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -456,14 +453,16 @@ namespace Actions {
|
|||||||
console.log('REMOVE ALL SUBSCRIPTION...')
|
console.log('REMOVE ALL SUBSCRIPTION...')
|
||||||
await navigator.serviceWorker.ready.then(function (reg) {
|
await navigator.serviceWorker.ready.then(function (reg) {
|
||||||
console.log('... Ready')
|
console.log('... Ready')
|
||||||
reg.pushManager.getSubscription().then(function(subscription) {
|
reg.pushManager.getSubscription().then((subscription) => {
|
||||||
console.log(' Found Subscription...')
|
console.log(' Found Subscription...')
|
||||||
|
if (subscription) {
|
||||||
subscription.unsubscribe().then(function (successful) {
|
subscription.unsubscribe().then(function (successful) {
|
||||||
// You've successfully unsubscribed
|
// You've successfully unsubscribed
|
||||||
console.log('You\'ve successfully unsubscribed')
|
console.log('You\'ve successfully unsubscribed')
|
||||||
}).catch(function (e) {
|
}).catch(function (e) {
|
||||||
// Unsubscription failed
|
// Unsubscription failed
|
||||||
})
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user