Created Test Environment test.freeplanet.app

and Server: /var/www/test.freeplanet_server
This commit is contained in:
Paolo Arena
2021-09-28 23:44:55 +02:00
parent c16d444d1b
commit 489c4fecc7
39 changed files with 230 additions and 108 deletions

View File

@@ -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
}

View File

@@ -71,7 +71,7 @@ dark color="white" v-model="globalStore.autoplaydisc" label="Auto Play" class="s
<q-carousel-slide
v-for="(myrec, index) in myarr"
:key="index"
:img-src="`statics/`+myrec.img_small"
:img-src="`public/`+myrec.img_small"
:alt="myrec.label"
:name="index">
<div class="row q-ma-xs">

View File

@@ -69,7 +69,7 @@ v-if="myevent.news" class="cltexth4 chipnews shadow-5 glossy text-right" color="
<!-- Se c'è un link, allora -->
<q-btn
class="text-center boldhigh" v-if="myevent.linkpdf" size="md" type="a"
:href="`../../statics/` + myevent.linkpdf"
:href="`../../public/` + myevent.linkpdf"
target="_blank"
ripple rounded :label="myevent.title"
:color="myevent.bgcolor" text-color="white" glossy>
@@ -152,7 +152,7 @@ v-if="myevent.price && isShowPrice(myevent)" class="glossy" color="orange"
<div class="row justify-start q-ma-md">
<q-btn
v-if="myevent.linkpdf"
size="md" type="a" :href="`../../statics/` + myevent.linkpdf"
size="md" type="a" :href="`../../public/` + myevent.linkpdf"
target="_blank" rounded outline
color="primary" icon="info"
:label="$t('cal.showpdf')">

View File

@@ -20,7 +20,7 @@
- <a :href="urlmap" target="_blank" class="text-black">Apri Mappa</a>
</p>
<a :href="urlmap" target="_blank">
<q-img :src="`statics/` + imgmap" class="imgautosize" alt="my map">
<q-img :src="`public/` + imgmap" class="imgautosize" alt="my map">
</q-img>
</a>

View File

@@ -1,6 +1,6 @@
<template>
<q-card :class="getmycardcl" v-if="!!myproduct">
<q-img :src="`statics/` + myproduct.img" :alt="myproduct.name" :class="getclimg"></q-img>
<q-img :src="`public/` + myproduct.img" :alt="myproduct.name" :class="getclimg"></q-img>
<q-card-section>
<q-btn

View File

@@ -228,7 +228,7 @@ canvas {
}
.fa-facebook:before {
content: url('../../../public/icons/flag_it.svg');
content: url('../../../public/svg/flag_it.svg');
}
.clIconOnline {

View File

@@ -275,10 +275,10 @@ export default defineComponent({
let strv = ''
if (process.env.DEV) {
strv = 'DEV '
} else if (process.env.TEST) {
} else if (tools.isTest()) {
strv = 'TEST '
}
return `[${strv}${process.env.APP_VERSION}]`
return `[${strv} ver. ${process.env.APP_VERSION}]`
}
function getLangAtt() {
@@ -344,7 +344,13 @@ export default defineComponent({
}
function getappname() {
return tools.getsuffisso() + tools.getappname(tools.isMobile())
let mystr = tools.getsuffisso() + tools.getappname(tools.isMobile())
//if (!tools.isMobile()) {
mystr += ' ' + getAppVersion()
//}
return mystr
}
function toggleanimation() {
@@ -474,6 +480,7 @@ export default defineComponent({
getMsgText,
paotest,
logoutHandler,
isUserNotAuth,
}
},

View File

@@ -29,7 +29,6 @@
</div>
<q-btn
ripple
size="md"
id="newvers" v-if="isNewVersionAvailable()" color="secondary" rounded icon="refresh"
class="btnNewVersShow" @click="RefreshApp()" :label="t('notification.newVersionAvailable')">
@@ -40,9 +39,6 @@
<img :src="imglogo()" height="27" alt="Immagine Logo">
</q-avatar>
<div class="q-mx-sm titlesite">{{ getappname() }}</div>
<template v-slot:subtitle>
<div>{{ t('msg.myDescriz') }} {{ getAppVersion() }}</div>
</template>
</q-toolbar-title>
<!--

View File

@@ -573,24 +573,24 @@ $heightBtn: 100%;
}
.fa-flag-it:before {
content: url('../../public/icons/flag_it.svg');
content: url('../../public/svg/flag_it.svg');
}
.fa-flag-us:before {
content: url('../../public/icons/flag_us.svg');
content: url('../../public/svg/flag_us.svg');
}
.fa-flag-es:before {
content: url('../../public/icons/flag_es.svg');
content: url('../../public/svg/flag_es.svg');
}
.fa-flag-gb:before {
content: url('../../public/icons/flag_gb.svg');
content: url('../../public/svg/flag_gb.svg');
}
.fa-flag-de:before {
content: url('../../public/icons/flag_de.svg');
content: url('../../public/svg/flag_de.svg');
}
.animazione {

View File

@@ -9,8 +9,8 @@
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>">
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png">
<link rel="icon" type="image/ico" href="favicon.ico">
</head>
<body>

View File

@@ -12,9 +12,9 @@ import { useI18n } from '@/boot/i18n'
export default function () {
function getImgEvent(event: IEvents) {
if (!!event.img)
return 'statics/' + event.img
return 'public/' + event.img
else
return 'statics/images/noimg.png'
return 'public/images/noimg.png'
}
function getStyleByEvent(event: IEvents, visu: boolean) {

View File

@@ -96,9 +96,6 @@
</div>
</div>
<div class="q-pt-md q-pl-sm">
<div class="text-body2">Ver. {{ getenv('APP_VERSION') }}</div>
</div>
</div>
</div>
</div>
@@ -187,9 +184,6 @@
</div>
</div>
<div class="q-pt-md q-pl-sm">
<div class="text-body2">Ver. {{ getenv('APP_VERSION') }}</div>
</div>
</div>
</div>
</div>
@@ -281,10 +275,6 @@
</div>
</div>
<div class="q-pt-md q-pl-sm">
<div class="text-body2">Ver. {{ getenv('APP_VERSION') }}</div>
</div>
</div>
</div>
</div>

View File

@@ -90,13 +90,13 @@ export default defineComponent({
if (actiontype.value === shared_consts.TypeMsg_Actions.YESNO) {
param.actions = [
{ action: 'confirm', title: 'Si', icon: '/statics/icons/opz1-icon-96x96.png' },
{ action: 'cancel', title: 'No', icon: '/statics/icons/opz2-icon-96x96.png' }
{ action: 'confirm', title: 'Si', icon: '/public/images/opz1-icon-96x96.jpg' },
{ action: 'cancel', title: 'No', icon: '/public/images/opz2-icon-96x96.jpg' }
]
} else if (actiontype.value === shared_consts.TypeMsg_Actions.OPZ1_2) {
param.actions = [
{ action: 'opz1', title: opz1.value, icon: '/statics/icons/opz1-icon-96x96.png' },
{ action: 'opz2', title: opz2.value, icon: '/statics/icons/opz2-icon-96x96.png' }
{ action: 'opz1', title: opz1.value, icon: '/public/images/opz1-icon-96x96.jpg' },
{ action: 'opz2', title: opz2.value, icon: '/public/images/opz2-icon-96x96.jpg' }
]
}

View File

@@ -1456,7 +1456,7 @@ export const tools = {
} else {
this.showNotif($q, t('notification.denied'), { color: 'negative', icon: 'notifications' })
// displayConfirmNotification();
tools.displayConfirmNotification();
}
})
},
@@ -2552,17 +2552,17 @@ export const tools = {
if ('serviceWorker' in navigator) {
options = {
body: 'You successfully subscribed to our Notification service!',
icon: '/public/icons/app-icon-96x96.png',
image: '/public/images/sf-boat.jpg',
icon: '/icons/app-icon-96x96.png',
image: '/images/sf-boat.jpg',
dir: 'ltr',
lang: 'enUs', // BCP 47,
vibrate: [100, 50, 200],
badge: '/public/icons/app-icon-96x96.png',
badge: '/icons/app-icon-96x96.png',
tag: 'confirm-notification',
renotify: true, // if it's already sent, will Vibrate anyway
actions: [
{ action: 'confirm', title: 'Okay', icon: '/public/icons/app-icon-96x96.png' },
{ action: 'cancel', title: 'Cancel', icon: '/public/icons/app-icon-96x96.png' },
{ action: 'confirm', title: 'Okay', icon: '/icons/app-icon-96x96.png' },
{ action: 'cancel', title: 'Cancel', icon: '/icons/app-icon-96x96.png' },
],
}
@@ -2595,17 +2595,17 @@ export const tools = {
if ('serviceWorker' in navigator) {
options = {
body: t('notification.subscribed'),
icon: '/public/icons/android-chrome-192x192.png',
icon: '/public/images/android-chrome-192x192.png',
image: '/public/images/imglogonotif.png',
dir: 'ltr',
lang: 'enUs', // BCP 47,
vibrate: [100, 50, 200],
badge: '/public/icons/android-chrome-192x192.png',
badge: '/public/images/android-chrome-192x192.png',
tag: 'confirm-notification',
renotify: true, // if it's already sent, will Vibrate anyway
actions: [
{ action: 'confirm', title: t('dialog.ok'), icon: '/public/icons/android-chrome-192x192.png' },
// { action: 'cancel', title: 'Cancel', icon: '/statics/icons/android-chrome-192x192.png', }
{ action: 'confirm', title: t('dialog.ok'), icon: '/public/images/android-chrome-192x192.png' },
// { action: 'cancel', title: 'Cancel', icon: '/statics/images/android-chrome-192x192.png', }
],
}