Fixed refresh problem of video... during change tabpage...

This commit is contained in:
Paolo Arena
2019-12-28 17:47:27 +01:00
parent 5d32378df8
commit ae5770f79b
6 changed files with 554 additions and 390 deletions

View File

@@ -23,7 +23,8 @@
"serve": "quasar serve ./dist/spa", "serve": "quasar serve ./dist/spa",
"serve:coverage": "quasar serve test/coverage/lcov-report/ --cache 0 --port 8788", "serve:coverage": "quasar serve test/coverage/lcov-report/ --cache 0 --port 8788",
"deploy": "deploy.sh", "deploy": "deploy.sh",
"deploy_server_test": "NODE_ENV=test quasar build -m pwa", "test": "NODE_ENV=test DEBUG=v8:* quasar build",
"deploy_server_test_pwa": "NODE_ENV=test quasar build -m pwa",
"generate-sw": "workbox generateSW workbox-config.js" "generate-sw": "workbox generateSW workbox-config.js"
}, },
"dependencies": { "dependencies": {

View File

@@ -158,7 +158,7 @@ module.exports = function (ctx) {
}, },
devServer: { devServer: {
https: false, https: false,
port: 8084, port: 8085,
open: false // opens browser window automatically open: false // opens browser window automatically
}, },
// framework: 'all' --- includes everything; for dev only! // framework: 'all' --- includes everything; for dev only!

View File

@@ -31,6 +31,12 @@ export default class App extends Vue {
console.info('SESSIONE IN SVILUPPO ! (DEV)') console.info('SESSIONE IN SVILUPPO ! (DEV)')
console.info(process.env) console.info(process.env)
} }
if (process.env.TEST) {
console.info('SESSIONE IN TEST ! (TEST)')
console.info(process.env)
}
console.info('NodeEnv', process.env.NODE_ENV)
if (process.env.PROD) { if (process.env.PROD) {
console.info('SESSIONE IN PRODUZIONE!') console.info('SESSIONE IN PRODUZIONE!')
// console.info(process.env) // console.info(process.env)

View File

@@ -19,8 +19,60 @@ const functionality: IFunctionality = {
BOOKING_EVENTS: false BOOKING_EVENTS: false
} }
const routes_newsletter: IListRoutes[] = [
{
active: true,
name: 'newsletter.template', path: '/admin/newsletter/templemail', materialIcon: 'fas fa-users',
component: () => import('@/rootgen/admin/newsletter/newsletter.vue'),
inmenu: true, submenu: true, level_parent: 0.5, level_child: 0.5, onlyManager: true
},
{
active: true,
name: 'newsletter.sendemail', path: '/admin/newsletter/newnewsletter', materialIcon: 'fas fa-users',
component: () => import('@/rootgen/admin/newsletter/newsletter.vue'),
inmenu: true, submenu: true, level_parent: 0.5, level_child: 0.5, onlyManager: true
},
{
active: true,
name: 'newsletter.check', path: '/admin/newsletter/check', materialIcon: 'fas fa-users',
component: () => import('@/rootgen/admin/newsletter/newsletter.vue'),
inmenu: true, submenu: true, level_parent: 0.5, level_child: 0.5, onlyManager: true
},
{
active: true,
name: 'newsletter.sent', path: '/admin/newsletter/newslist', materialIcon: 'fas fa-users',
component: () => import('@/rootgen/admin/newsletter/newsletter.vue'),
inmenu: true, submenu: true, level_parent: 0.5, level_child: 0.5, onlyManager: true
},
{
active: true,
name: 'newsletter.mailinglist', path: '/admin/newsletter/mailinglist', materialIcon: 'fas fa-users',
component: () => import('@/rootgen/admin/newsletter/newsletter.vue'),
inmenu: true, submenu: true, level_parent: 0.5, level_child: 0.5, onlyManager: true
},
{
active: true,
name: 'newsletter.settings', path: '/admin/newsletter/settings', materialIcon: 'fas fa-users',
component: () => import('@/rootgen/admin/newsletter/newsletter.vue'),
inmenu: true, submenu: true, level_parent: 0.5, level_child: 0.5, onlyManager: true
},
{
active: true,
name: 'newsletter.serversettings', path: '/admin/newsletter/main_settings', materialIcon: 'fas fa-users',
component: () => import('@/rootgen/admin/newsletter/newsletter.vue'),
inmenu: true, submenu: true, level_parent: 0.5, level_child: 0.5, onlyManager: true
},
{
active: true,
name: 'newsletter.others', path: '/admin/newsletter/events', materialIcon: 'fas fa-users',
component: () => import('@/rootgen/admin/newsletter/newsletter.vue'),
inmenu: true, submenu: true, level_parent: 0.5, level_child: 0.5, onlyManager: true
},
]
const routes_manager: IListRoutes[] = [ const routes_manager: IListRoutes[] = [
{ {
active: true,
path: '/admin/userlist', path: '/admin/userlist',
materialIcon: 'fas fa-users', materialIcon: 'fas fa-users',
name: 'otherpages.admin.userlist', name: 'otherpages.admin.userlist',
@@ -32,6 +84,7 @@ const routes_manager: IListRoutes[] = [
onlyManager: true onlyManager: true
}, },
{ {
active: true,
path: '/admin/tableslist', path: '/admin/tableslist',
materialIcon: 'fas fa-users', materialIcon: 'fas fa-users',
name: 'otherpages.admin.tableslist', name: 'otherpages.admin.tableslist',
@@ -42,10 +95,73 @@ const routes_manager: IListRoutes[] = [
level_child: 0.5, level_child: 0.5,
onlyManager: true onlyManager: true
}, },
{
active: true,
path: '/admin/pages',
materialIcon: 'fas fa-file-alt',
name: 'otherpages.admin.pages',
component: () => import('@/rootgen/admin/pages/pages.vue'),
inmenu: true,
submenu: true,
level_parent: 0,
level_child: 0.5,
onlyManager: true
},
{
active: true,
path: '/admin/gallery',
materialIcon: 'fas fa-file-alt',
name: 'otherpages.admin.gallery',
component: () => import('@/rootgen/admin/gallery/gallery.vue'),
inmenu: true,
submenu: true,
level_parent: 0,
level_child: 0.5,
onlyManager: true
},
{
active: true,
path: '/admin/media',
materialIcon: 'fas fa-file-alt',
name: 'otherpages.admin.media',
component: () => import('@/rootgen/admin/uploader/uploader.vue'),
inmenu: true,
submenu: true,
level_parent: 0,
level_child: 0.5,
onlyManager: true
},
{
active: true,
path: '/admin/newsletter',
materialIcon: 'fas fa-users',
name: 'otherpages.admin.newsletter',
inmenu: false,
submenu: true,
routes2: routes_newsletter,
solotitle: true,
level_parent: 0.5,
level_child: 0.5,
onlyManager: true
},
{
active: functionality.BOOKING_EVENTS,
path: '/admin/usereventlist',
materialIcon: 'edit',
name: 'otherpages.admin.usereventlist',
component: () => import('@/rootgen/admin/eventlist/eventlist.vue'),
inmenu: true,
submenu: true,
level_parent: 0,
level_child: 0.5,
infooter: true,
onlyManager: true
}
] ]
const routes: IListRoutes[] = [ const routes: IListRoutes[] = [
{ {
active: true,
path: '/', path: '/',
materialIcon: 'home', materialIcon: 'home',
name: 'pages.home', name: 'pages.home',
@@ -65,6 +181,7 @@ const routes: IListRoutes[] = [
}, },
*/ */
{ {
active: true,
path: '/manage', path: '/manage',
materialIcon: 'fas fa-users-cog', materialIcon: 'fas fa-users-cog',
name: 'otherpages.manage.menu', name: 'otherpages.manage.menu',
@@ -76,6 +193,7 @@ const routes: IListRoutes[] = [
}, },
...routes_manager, ...routes_manager,
{ {
active: functionality.SHOW_MESSAGES,
path: '/messages/:un', path: '/messages/:un',
materialIcon: 'fas fa-comment', materialIcon: 'fas fa-comment',
name: 'otherpages.messages.menu', name: 'otherpages.messages.menu',
@@ -85,8 +203,10 @@ const routes: IListRoutes[] = [
reqauth: true reqauth: true
}, },
// --- NOT IN MENU: --- // --- NOT IN MENU: ---
{ path: '/policy', name: 'pages.policy', component: () => import('@/root/policy/policy.vue') }, { active: true,
path: '/policy', name: 'pages.policy', component: () => import('@/root/policy/policy.vue') },
{ {
active: functionality.ENABLE_REGISTRATION,
path: '/signup', path: '/signup',
materialIcon: 'how_to_reg', materialIcon: 'how_to_reg',
name: 'pages.SignUp', name: 'pages.SignUp',
@@ -96,6 +216,7 @@ const routes: IListRoutes[] = [
separator: false separator: false
}, },
{ {
active: true,
path: '/signin', path: '/signin',
materialIcon: 'account_circle', materialIcon: 'account_circle',
name: 'pages.SignIn', name: 'pages.SignIn',
@@ -103,8 +224,8 @@ const routes: IListRoutes[] = [
inmenu: false, inmenu: false,
infooter: true infooter: true
}, },
{ path: '/vreg', name: 'Verify Reg', component: () => import('@/views/login/vreg/vreg.vue') }, { active: true, path: '/vreg', name: 'Verify Reg', component: () => import('@/views/login/vreg/vreg.vue') },
{ path: '/offline', name: 'Offline', component: () => import('@/views/offline/offline.vue') }, { active: true, path: '/offline', name: 'Offline', component: () => import('@/views/offline/offline.vue') },
] ]
const preLoadImages: IPreloadImages[] = [ const preLoadImages: IPreloadImages[] = [

View File

@@ -50,6 +50,9 @@ export default class Home extends MixinBase {
public slide2 = 0 public slide2 = 0
public animare: number = 0 public animare: number = 0
public endload: boolean = false public endload: boolean = false
public indvideo: number = 0
public arrvideo_yt = []
public arrvideo_mp4 = []
public arrsteps = [ public arrsteps = [
{ {
@@ -143,7 +146,7 @@ export default class Home extends MixinBase {
public audiofiles = { public audiofiles = {
it: [ it: [
{ {
title: 'Chiara (1)', title: 'Elisa (1)',
label: '1', label: '1',
value: 0, value: 0,
src: 'statics/audio/it/spiegazione_Billettera.mp3', src: 'statics/audio/it/spiegazione_Billettera.mp3',
@@ -286,8 +289,10 @@ export default class Home extends MixinBase {
// console.log('this.firstClassSection', this.firstClassSection) // console.log('this.firstClassSection', this.firstClassSection)
}, mytime) }, mytime)
} }
public beforeDestroy() { public beforeDestroy() {
// console.log('beforeDestroy') // console.log('beforeDestroy')
clearInterval(this.polling) clearInterval(this.polling)
@@ -296,6 +301,15 @@ export default class Home extends MixinBase {
public created() { public created() {
this.animare = process.env.DEV ? 0 : 8000 this.animare = process.env.DEV ? 0 : 8000
for (let index = 0; index <= this.getvideonum(true); ++index) {
this.arrvideo_yt.push(this.getvideomp4yt(index))
}
for (let index = 0; index <= this.getvideonum(false); ++index) {
this.arrvideo_mp4.push(this.getvideomp4src(index))
}
console.log(this.arrvideo_mp4)
GlobalStore.actions.prova() GlobalStore.actions.prova()
this.endload = true this.endload = true
@@ -415,6 +429,19 @@ export default class Home extends MixinBase {
return this.getValDb(this.getkey(youtube, false, true), false) return this.getValDb(this.getkey(youtube, false, true), false)
} }
get getvideonum_youtube() {
return this.getvideonum(true)
}
get getvideonum_mp4() {
return this.getvideonum(false)
}
get heightgallvideo() {
const h = tools.heightgallery(this.getValDb('MP4_W', false) / this.getValDb('MP4_H', false))
return h
}
public mygetarrValDb(keystr, serv) { public mygetarrValDb(keystr, serv) {
const myval = GlobalStore.getters.getValueSettingsByKey(keystr, serv) const myval = GlobalStore.getters.getValueSettingsByKey(keystr, serv)
// console.log('AA: myval', myval) // console.log('AA: myval', myval)
@@ -469,6 +496,11 @@ export default class Home extends MixinBase {
] ]
} }
public getvideomp4yt(index) {
return [{ src: this.getvideourl(index, true), type: 'video/mp4' }
]
}
public getvideoposter(index) { public getvideoposter(index) {
return '' return ''
} }

View File

@@ -106,7 +106,8 @@
<p class="cltexth4 text-red-8">E' uno scambio di Reciproco Aiuto</p> <p class="cltexth4 text-red-8">E' uno scambio di Reciproco Aiuto</p>
<p class="cltexth4 text-blue-8"> <p class="cltexth4 text-blue-8">
E' un sistema Circolare UMANO, che, se seguito bene, con il minimo sforzo, si ottieme il massimo apporto. E' un sistema Circolare UMANO, che, se seguito bene, con il minimo sforzo, si ottieme il massimo
apporto.
</p> </p>
</div> </div>
</CImgText> </CImgText>
@@ -178,7 +179,7 @@
transition-prev="slide-right" transition-prev="slide-right"
v-model="slide_video" v-model="slide_video"
ref="slide_video" ref="slide_video"
:height="tools.heightgallery(getValDb('MP4_W', false) / getValDb('MP4_H', false))" :height="heightgallvideo"
width="100%" width="100%"
> >
<template v-slot:control> <template v-slot:control>
@@ -200,7 +201,7 @@
</q-carousel-control> </q-carousel-control>
</template> </template>
<q-carousel-slide v-for="index in getvideonum(false)" :name="`mp4_`+index" :key="index"> <q-carousel-slide v-for="index in getvideonum_mp4" :name="`mp4_`+index" :key="index">
<div v-if="getvideourl(index, false)" <div v-if="getvideourl(index, false)"
class="row justify-evenly items-center q-gutter-sm "> class="row justify-evenly items-center q-gutter-sm ">
@@ -211,7 +212,7 @@
<div class=""> <div class="">
<q-media-player <q-media-player
type="video" type="video"
:sources="getvideomp4src(index)" :sources="arrvideo_mp4[index]"
:poster="getvideoposter(index)" :poster="getvideoposter(index)"
> >
</q-media-player> </q-media-player>
@@ -222,7 +223,7 @@
</q-carousel-slide> </q-carousel-slide>
<q-carousel-slide v-for="index in getvideonum(true)" :name="`yt_`+index" :key="index"> <q-carousel-slide v-for="index in getvideonum_youtube" :name="`yt_`+index" :key="index">
<div v-if="getvideourl(index, true)" <div v-if="getvideourl(index, true)"
class="row justify-evenly items-center q-gutter-sm "> class="row justify-evenly items-center q-gutter-sm ">
@@ -232,7 +233,7 @@
<iframe <iframe
:width="tools.getwidthscale(mythis(), getValDb('YT_W', false), 800)" :width="tools.getwidthscale(mythis(), getValDb('YT_W', false), 800)"
:height="tools.getheightbywidth(mythis(), getValDb('YT_W', false), getValDb('YT_H', false), 800)" :height="tools.getheightbywidth(mythis(), getValDb('YT_W', false), getValDb('YT_H', false), 800)"
:src="getvideourl(index, true)" :src="arrvideo_yt[index]"
frameborder="0" frameborder="0"
allowfullscreen allowfullscreen
></iframe> ></iframe>
@@ -243,20 +244,26 @@
</q-carousel-slide> </q-carousel-slide>
</q-carousel> </q-carousel>
</div> </div>
</section> </section>
<CTitleBanner class="q-pa-xs" :title="$t('text.what')" bgcolor="bg-secondary" clcolor="text-white" <CTitleBanner class="q-pa-xs" :title="$t('text.what')" bgcolor="bg-secondary" clcolor="text-white"
mystyle="letter-spacing: 0.25rem; "> mystyle="letter-spacing: 0.25rem; ">
<div class="q-mx-md cltexth4" > <div class="q-mx-md cltexth4">
1) Voglia di giocare, e desiderio di Donare 33 per aiutare un'altra persona a realizzare i propri sogni.<br><br> 1) Voglia di giocare, e desiderio di Donare 33 per aiutare un'altra persona a realizzare i propri
<q-img src="/statics/images/it/Esempio_di_Billettera_di_Vera.jpg"></q-img> sogni.<br><br>
2) L'impegno di seguire delle indicazioni nei tempi stabiliti all' interno di una chat whatsapp, dove ogni passaggio è spiegato e guidato.<br><br> <div class="text-center row block">
3) Parlare e condividere ai tuoi amici un messaggio dove spieghi questo sistema, impegnandoti così a trovare 2 persone interessate ad entrare. <q-img src="/statics/images/it/Esempio_di_Billettera_di_Vera.jpg"
style="height: 400px; max-width: 400px;"></q-img>
</div>
2) L'impegno di seguire delle indicazioni nei tempi stabiliti all' interno di una chat whatsapp, dove ogni
passaggio è spiegato e guidato.<br><br>
3) Parlare e condividere ai tuoi amici un messaggio dove spieghi questo sistema, impegnandoti così a trovare
2 persone interessate ad entrare.
</div> </div>
</CTitleBanner> </CTitleBanner>
@@ -379,9 +386,6 @@
</div> </div>
</CTitleBanner> </CTitleBanner>
<CTitleBanner class="q-pa-xs" :title="$t('text.download')" bgcolor="bg-warning" clcolor="text-white" <CTitleBanner class="q-pa-xs" :title="$t('text.download')" bgcolor="bg-warning" clcolor="text-white"