2019-12-28 11:16:53 +01:00
import Vue from 'vue'
import { Component } from 'vue-property-decorator'
2020-07-15 23:07:07 +02:00
import { GlobalStore , UserStore , NotevoleStore } from '@store'
2019-12-28 11:16:53 +01:00
import { Logo } from '../../components/logo'
import { Footer } from '../../components/Footer'
2020-07-15 23:07:07 +02:00
import { CMyPage } from '../../components/CMyPage/index'
2019-12-28 11:16:53 +01:00
import VueScrollReveal from 'vue-scroll-reveal'
import { tools } from '@src/store/Modules/tools'
2020-07-15 23:07:07 +02:00
import { func_tools , toolsext } from '@src/store/Modules/toolsext'
2019-12-28 11:16:53 +01:00
import { Screen } from 'quasar'
2020-07-15 23:07:07 +02:00
import MixinMetaTags from '@src/mixins/mixin-metatags'
import {
CCardCarousel ,
CImgText ,
CTitleBanner ,
CStatus ,
CStatusReg ,
CNextZoom ,
CVerifyTelegram , CVerifyEmail
} from '@components'
import MixinBase from '@src/mixins/mixin-base'
import { static_data } from '@src/db/static_data'
import { INotData } from '@src/model'
// Vue.use(VueScrollReveal, {
// class: 'v-scroll-reveal', // A CSS class applied to elements with the v-scroll-reveal directive; useful for animation overrides.
// duration: 1200,
// scale: 0.95,
// distance: '10px',
// rotate: {
// x: 0,
// y: 0,
// z: 0
// }
// // mobile: true
// })
2019-12-28 11:16:53 +01:00
@Component ( {
2020-07-15 23:07:07 +02:00
mixins : [ MixinBase ] ,
components : { Logo , Footer , CMyPage , CCardCarousel , CTitleBanner , CImgText , CStatus , CStatusReg , CNextZoom , CVerifyTelegram , CVerifyEmail }
2019-12-28 11:16:53 +01:00
} )
2020-07-15 23:07:07 +02:00
export default class Home extends MixinBase {
2019-12-28 11:16:53 +01:00
public text : string = ''
public visibile : boolean = false
public cardvisible : string = 'hidden'
public displaycard : string = 'block'
public $t : any
// public firstClassSection: string = 'landing_background fade homep-cover-img animate-fade homep-cover-img-1'
public firstClassSection : string = 'fade homep-cover-img animate-fade homep-cover-img-1'
public $q
public polling
public slide = 'first'
2020-07-15 23:07:07 +02:00
public slide_video = 'yt_1'
public mysteps = 0
public myaudio = 0
public mytestimonianze = 0
public tab = 'guida'
public slide2 = 0
2019-12-28 11:16:53 +01:00
public animare : number = 0
2020-07-15 23:07:07 +02:00
public endload : boolean = false
public indvideo : number = 0
public arrvideo_yt = [ ]
public arrvideo_mp4 = [ ]
public arrsteps = [
2019-12-28 11:16:53 +01:00
{
2020-07-15 23:07:07 +02:00
label : '1' ,
value : 0 ,
title : {
it : '<strong>Passo 1 - Contributore Finanziario</strong><br><br>' +
'A) Capisco come funziona e lo condivido ad altre 2 persone che vogliono partecipare.<br>' +
'B) Entro nella chat e dono i <strong>33€</strong> al gestore della Billettera.' ,
es : '' ,
enUs : ''
} ,
myicon : 'fas fa-donate' ,
2019-12-28 11:16:53 +01:00
} ,
{
2020-07-15 23:07:07 +02:00
label : '2' ,
value : 1 ,
title : {
it : '<strong>Passo 2 - Contributore solidale</strong><br><br>' +
'Invio il link per registrarsi alle mie 2 persone, che cosí verseranno i 33€.' ,
es : '' ,
enUs : ''
} ,
myicon : 'fas fa-user-friends' ,
myicon2 : 'fas fa-coins'
2019-12-28 11:16:53 +01:00
} ,
{
2020-07-15 23:07:07 +02:00
label : '3' ,
value : 2 ,
title : {
it : '<strong>Passo 3 - Tesoriere/segretario</strong><br><br>' +
'Collaboro, aggiorno la lista dei doni, fornisco informazioni, ma anche conosco, condivido esperienze, passioni e sogni.' ,
es : '' ,
enUs : ''
} ,
myicon : 'fas fa-piggy-bank' ,
myicon2 : 'far fa-laugh' ,
myicon3 : 'far fa-comments'
2019-12-28 11:16:53 +01:00
} ,
{
2020-07-15 23:07:07 +02:00
label : '4' ,
value : 3 ,
title : {
it : '<strong>Passo 4 - Apertura tua Billettera</strong><br>' +
'Creo il mio gruppo Telegram nel quale entrano i miei 2 ospiti, i 2 ospiti dei miei 2 ospiti, che porteranno altre 8 persone (4x2).<br>' +
'<br>Ricevuti i 33€ da queste 8 persone (264€), mi tengo i mei <strong>iniziali 33€</strong> e <strong>dono 231 €</strong> alla Billettera "Mas Antigua".' ,
es : '' ,
enUs : ''
} ,
myicon : 'fab fa-whatsapp' ,
myicon2 : 'fas fa-wallet'
2019-12-28 11:16:53 +01:00
} ,
{
2020-07-15 23:07:07 +02:00
label : '5' ,
value : 4 ,
title : {
it : '<strong>Passo 5</strong><br>' +
'Aspetto, da parte delle 8 nuove Billettere, le donazioni di 231€, per un totale di <strong>1848€</strong>.<br>' +
'<br>Ringrazio l\'<strong>Universo</strong> per il <strong>dono</strong> ricevuto e fornisco <strong>aiuto</strong> a chi ne ha bisogno.<br>' +
'Se desidero, posso <strong>ricominciare</strong>!' ,
es : '' ,
enUs : ''
} ,
myicon : 'far fa-clock' ,
myicon2 : 'fas fa-euro-sign' ,
myicon3 : 'fas fa-praying-hands' ,
myimg : '/' + tools . getimglogo ( ) ,
2019-12-28 11:16:53 +01:00
}
2020-07-15 23:07:07 +02:00
]
2019-12-28 11:16:53 +01:00
2020-07-15 23:07:07 +02:00
public advise = [
{
title : {
it : 'La forza di questo gioco sono le Persone e la Collaborazione.<br>Vincete la timidezza e scrivete agli amici su whatsapp, facebook, Telegram.' ,
es : '' ,
enUs : ''
} ,
color : 'white' , icon : 'fas fa-hands-helping' ,
textcolor : 'black'
} ,
{
title : {
it : 'È un lavoro di squadra, dove ognuno fa la sua parte.' ,
es : '' ,
enUs : ''
} ,
color : 'white' ,
icon : 'fas fa-users' ,
textcolor : 'black'
} ,
{
title : {
it : 'E\' un\'opportunità di risentire vecchi amici, ed avere un intento comune, per risentirci e di riconnetterci.<br>' ,
es : '' ,
enUs : ''
} ,
color : 'white' ,
icon : 'fas fa-hand-holding-heart' ,
textcolor : 'black'
}
2019-12-28 11:16:53 +01:00
]
constructor ( ) {
super ( )
// console.log('Home constructor...')
this . initprompt ( )
}
2020-07-15 23:07:07 +02:00
public meta() {
return tools . metafunc ( this )
2019-12-28 11:16:53 +01:00
}
2020-07-15 23:07:07 +02:00
get notevolerec() {
return UserStore . state
2019-12-28 11:16:53 +01:00
}
get tools() {
return tools
}
2020-07-15 23:07:07 +02:00
get TelegVerificato() {
return UserStore . state . my . profile . teleg_id > 0
}
get visuStatus() {
return ! this . isVerificato || ! this . TelegVerificato || UserStore . state . my . profile . paymenttypes . length === 0
}
2019-12-28 11:16:53 +01:00
public mounted() {
2020-07-15 23:07:07 +02:00
2019-12-28 11:16:53 +01:00
let primo = true
const mytime = 10000
this . polling = setInterval ( ( ) = > {
this . firstClassSection = 'landing_background fade homep-cover-img ' + ( primo ? 'homep-cover-img-2' : 'homep-cover-img-1' )
primo = ! primo
// console.log('this.firstClassSection', this.firstClassSection)
} , mytime )
2019-12-28 17:47:27 +01:00
2019-12-28 11:16:53 +01:00
}
public beforeDestroy() {
2020-07-15 23:07:07 +02:00
// console.log('beforeDestroy')
2019-12-28 11:16:53 +01:00
clearInterval ( this . polling )
}
public created() {
2020-07-15 23:07:07 +02:00
if ( ! ! tools . getCookie ( tools . TABBED_HOME ) ) {
this . tab = tools . getCookie ( tools . TABBED_HOME )
}
2019-12-28 11:16:53 +01:00
this . animare = process . env . DEV ? 0 : 8000
2020-07-15 23:07:07 +02:00
for ( let index = 0 ; index <= tools . getvideonum ( true ) ; ++ index ) {
this . arrvideo_yt . push ( tools . getvideoyt ( index ) )
}
for ( let index = 0 ; index <= tools . getvideonum ( false ) ; ++ index ) {
this . arrvideo_mp4 . push ( tools . getvideomp4src ( index ) )
}
2019-12-28 11:16:53 +01:00
GlobalStore . actions . prova ( )
2020-07-15 23:07:07 +02:00
this . endload = true
}
get getvideonum_youtube() {
return tools . getvideonum ( true )
}
get getvideonum_mp4() {
return tools . getvideonum ( false )
}
get heightgallvideo() {
return tools . heightgallvideo ( )
2020-01-13 23:52:14 +01:00
}
2019-12-28 11:16:53 +01:00
get isLogged() {
return UserStore . state . isLogged
}
2020-07-15 23:07:07 +02:00
get static_data() {
return static_data
2020-01-20 01:48:34 +01:00
}
2019-12-28 11:16:53 +01:00
public mystilecard() {
return {
visibility : this.cardvisible ,
display : this.displaycard
}
}
get conta() {
return GlobalStore . state . conta
}
public getenv ( myvar ) {
return process . env [ myvar ]
}
set conta ( valore ) {
GlobalStore . actions . setConta ( valore )
const my = this . $q . lang . isoName
tools . showNotif ( this . $q , String ( my ) )
}
public initprompt() {
2020-07-15 23:07:07 +02:00
window . addEventListener ( 'beforeinstallprompt' , ( event ) = > {
2019-12-28 11:16:53 +01:00
// console.log('******************************** beforeinstallprompt fired')
event . preventDefault ( )
// console.log('§§§§§§§§§§§§§§§§§§§§ IMPOSTA DEFERRED PROMPT !!!!!!!!!!!!!!!!! ')
// #Todo++ IMPOSTA DEFERRED PROMPT
return false
} )
}
get isInCostruction() {
return process . env . IN_CONSTRUCTION === '1'
}
public getPermission() {
return Notification . permission
}
public NotServiceWorker() {
return ( ! ( 'serviceWorker' in navigator ) )
}
public PagLogin() {
this . $router . replace ( '/signin' )
}
public PagReg() {
this . $router . replace ( '/signup' )
}
public openCreatePostModal() {
console . log ( 'APERTO ! openCreatePostModal' )
this . conta = this . conta + 1
this . visibile = ! this . visibile
if ( this . visibile ) {
this . displaycard = 'block'
this . cardvisible = 'visible'
} else {
this . displaycard = 'block'
this . cardvisible = 'hidden'
}
}
2020-07-15 23:07:07 +02:00
get getappname() {
return tools . getappname ( this , false )
}
public gettitle_advise ( rec ) {
return rec . title [ tools . getLocale ( ) ]
}
public geticonlist ( rec ) {
if ( rec . icon ) {
return rec . icon
} else {
return 'fas fa-info'
}
}
public getfileimgdown ( rec ) {
return rec . file [ tools . getLocale ( ) ]
}
get isVerificato() {
return UserStore . getters . isVerificato
}
get isEmailVerified() {
return UserStore . state . my . verified_email
}
public openrighttoolbar() {
GlobalStore . state . RightDrawerOpen = true
}
get TelegCode() {
return UserStore . state . my . profile . teleg_checkcode
}
public changetab ( val ) {
tools . setCookie ( tools . TABBED_HOME , val )
}
2019-12-28 11:16:53 +01:00
}