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"
|
||||
APP_ID="1"
|
||||
APP_URL="https://freeplanet.app"
|
||||
URL_FACEBOOK="https://www.facebook.com/freeplanetapp"
|
||||
PROVA_PAOLO="PROVA SVILUPPO"
|
||||
LANG_DEFAULT="it"
|
||||
PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="q-app">
|
||||
<div class="q-pa-xs">
|
||||
<div>
|
||||
<q-layout view="hHh Lpr lff" class="shadow-2 rounded-borders">
|
||||
<app-header></app-header>
|
||||
<q-ajax-bar></q-ajax-bar>
|
||||
|
||||
@@ -33,6 +33,7 @@ export default class Header extends Vue {
|
||||
public clCloudDown_Indexeddb: string = 'clIndexeddbsend'
|
||||
public right: boolean = false
|
||||
public photo = ''
|
||||
public visuimg: boolean = true
|
||||
|
||||
public selectOpLang = [
|
||||
{ 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()
|
||||
}
|
||||
|
||||
public toggleanimation() {
|
||||
console.log('toggleanimation')
|
||||
this.visuimg = false
|
||||
setTimeout(() => {
|
||||
this.visuimg = true
|
||||
}, 100)
|
||||
}
|
||||
|
||||
get MenuCollapse() {
|
||||
return GlobalStore.state.menuCollapse
|
||||
// return true
|
||||
|
||||
@@ -44,18 +44,18 @@
|
||||
</q-toolbar-title>
|
||||
|
||||
|
||||
<!--
|
||||
<div v-if="isAdmin">
|
||||
<q-btn flat dense round aria-label="">
|
||||
<q-icon :class="clCloudUpload" name="cloud_upload"></q-icon>
|
||||
</q-btn>
|
||||
<!--
|
||||
<div v-if="isAdmin">
|
||||
<q-btn flat dense round aria-label="">
|
||||
<q-icon :class="clCloudUpload" name="cloud_upload"></q-icon>
|
||||
</q-btn>
|
||||
|
||||
<q-btn flat dense round aria-label="">
|
||||
<q-icon :class="clCloudUp_Indexeddb" name="arrow_upward"></q-icon>
|
||||
</q-btn>
|
||||
<q-btn flat dense round aria-label="">
|
||||
<q-icon :class="clCloudUp_Indexeddb" name="arrow_upward"></q-icon>
|
||||
</q-btn>
|
||||
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
-->
|
||||
|
||||
<q-btn
|
||||
v-if="!isonline"
|
||||
@@ -101,7 +101,7 @@
|
||||
<label>{{ $t('msg.hello') }}</label> <span v-model="prova"></span> !
|
||||
</div>-->
|
||||
|
||||
<q-btn dense flat round icon="menu" @click="right = !right" />
|
||||
<q-btn dense flat round icon="menu" @click="right = !right"/>
|
||||
|
||||
</q-toolbar>
|
||||
|
||||
@@ -120,21 +120,26 @@
|
||||
</q-drawer>
|
||||
|
||||
<q-drawer v-model="right" side="right" overlay bordered>
|
||||
<div id="profile" v-if="Username">
|
||||
<q-img class="absolute-top" src="https://cdn.quasar-framework.org/img/material.png" style="height: 150px">
|
||||
<div id="profile">
|
||||
<q-img class="absolute-top" src="https://cdn.quasar-framework.org/img/material.png"
|
||||
style="height: 150px">
|
||||
<div class="absolute-bottom bg-transparent">
|
||||
|
||||
<q-avatar class="q-mb-sm">
|
||||
<img src="../../statics/images/avatar-1.svg">
|
||||
</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 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="warning" icon="lock"></q-btn>
|
||||
<q-btn round color="secondary" icon="exit_to_app" @click='logoutHandler'></q-btn>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</q-img>
|
||||
|
||||
|
||||
@@ -55,6 +55,10 @@ export default class Home extends Vue {
|
||||
}, mytime)
|
||||
}
|
||||
|
||||
get appname() {
|
||||
return process.env.APP_NAME
|
||||
}
|
||||
|
||||
public beforeDestroy() {
|
||||
console.log('beforeDestroy')
|
||||
clearInterval(this.polling)
|
||||
@@ -72,6 +76,10 @@ export default class Home extends Vue {
|
||||
return process.env.TELEGRAM_SUPPORT
|
||||
}
|
||||
|
||||
get FBPage() {
|
||||
return process.env.URL_FACEBOOK
|
||||
}
|
||||
|
||||
public meta() {
|
||||
return {
|
||||
keywords: { name: 'keywords', content: 'Quasar website' },
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<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">
|
||||
{{$t('msg.sottoTitoloApp')}}
|
||||
</div>
|
||||
@@ -366,7 +366,7 @@
|
||||
<section class="landing__footer">
|
||||
<div class="text-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>
|
||||
|
||||
<a :href="TelegramSupport" target="_blank">
|
||||
|
||||
@@ -149,7 +149,8 @@ const messages = {
|
||||
error_doppiologin: 'Rieseguire il Login. Accesso aperto da un altro dispositivo.',
|
||||
},
|
||||
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: {
|
||||
incorso: 'Registrazione in corso...',
|
||||
@@ -382,7 +383,8 @@ const messages = {
|
||||
error_doppiologin: 'Vuelva a iniciar sesión. Acceso abierto por otro dispositivo.',
|
||||
},
|
||||
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: {
|
||||
incorso: 'Registro en curso...',
|
||||
@@ -608,7 +610,8 @@ const messages = {
|
||||
error_doppiologin: 'Signup again. Another access was made with another device.',
|
||||
},
|
||||
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: {
|
||||
incorso: 'Registration please wait...',
|
||||
|
||||
@@ -22,10 +22,16 @@ axiosInstance.interceptors.response.use(
|
||||
return response
|
||||
},
|
||||
(error) => {
|
||||
// console.log('error', error)
|
||||
if (error.response) {
|
||||
if (process.env.DEBUG === '1')
|
||||
console.log(error.response.status)
|
||||
console.log('Status = ', error.response.status)
|
||||
console.log('Request Error: ', error.response)
|
||||
if (error.response.status) {
|
||||
GlobalStore.mutations.setStateConnection('online')
|
||||
}
|
||||
} else {
|
||||
GlobalStore.mutations.setStateConnection('offline')
|
||||
}
|
||||
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
|
||||
}
|
||||
})
|
||||
ricevuto = true
|
||||
return new Types.AxiosSuccess(response.data, response.status)
|
||||
} else if (type === 'postFormData') {
|
||||
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
|
||||
}
|
||||
})
|
||||
ricevuto = true
|
||||
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('error.response=', error.response)
|
||||
}
|
||||
GlobalStore.mutations.setStateConnection(ricevuto ? 'online' : 'offline')
|
||||
let mycode = 0
|
||||
if (!ricevuto) {
|
||||
mycode = tools.ERR_SERVERFETCH
|
||||
|
||||
@@ -130,7 +130,8 @@ namespace Getters {
|
||||
Dashboard: {
|
||||
routes: [
|
||||
{ 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
|
||||
},
|
||||
{ route: '/category', faIcon: 'fa fa-list-alt', materialIcon: 'category', name: 'pages.Category' },
|
||||
@@ -334,11 +335,11 @@ namespace Actions {
|
||||
const mykey = process.env.PUBLICKEY_PUSH
|
||||
const mystate = state
|
||||
return navigator.serviceWorker.ready
|
||||
.then(function(swreg) {
|
||||
.then(function (swreg) {
|
||||
reg = swreg
|
||||
return swreg.pushManager.getSubscription()
|
||||
})
|
||||
.then(function(subscription) {
|
||||
.then(function (subscription) {
|
||||
mystate.wasAlreadySubscribed = !(subscription === null)
|
||||
|
||||
if (mystate.wasAlreadySubscribed) {
|
||||
@@ -355,10 +356,10 @@ namespace Actions {
|
||||
})
|
||||
}
|
||||
})
|
||||
.then(function(newSub) {
|
||||
.then(function (newSub) {
|
||||
saveNewSubscriptionToServer(context, newSub)
|
||||
})
|
||||
.catch(function(err) {
|
||||
.catch(function (err) {
|
||||
console.log('ERR createPushSubscription:', err)
|
||||
})
|
||||
}
|
||||
@@ -408,14 +409,10 @@ namespace Actions {
|
||||
async function deleteSubscriptionToServer(context) {
|
||||
console.log('DeleteSubscriptionToServer: ')
|
||||
|
||||
return await fetch(process.env.MONGODB_HOST + '/subscribe/del', {
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Accept': 'application/json',
|
||||
'x-auth': UserStore.state.x_auth_token
|
||||
}
|
||||
})
|
||||
return Api.SendReq('/subscribe/del', 'DELETE', null)
|
||||
.then((res) => {
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@@ -454,16 +451,18 @@ namespace Actions {
|
||||
if ('serviceWorker' in navigator) {
|
||||
// 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')
|
||||
reg.pushManager.getSubscription().then(function(subscription) {
|
||||
reg.pushManager.getSubscription().then((subscription) => {
|
||||
console.log(' Found Subscription...')
|
||||
subscription.unsubscribe().then(function(successful) {
|
||||
// You've successfully unsubscribed
|
||||
console.log('You\'ve successfully unsubscribed')
|
||||
}).catch(function(e) {
|
||||
// Unsubscription failed
|
||||
})
|
||||
if (subscription) {
|
||||
subscription.unsubscribe().then(function (successful) {
|
||||
// You've successfully unsubscribed
|
||||
console.log('You\'ve successfully unsubscribed')
|
||||
}).catch(function (e) {
|
||||
// Unsubscription failed
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user