Ordini
This commit is contained in:
@@ -17,7 +17,7 @@ import {
|
||||
CStatus,
|
||||
CStatusReg,
|
||||
CNextZoom,
|
||||
CVerifyTelegram, CVerifyEmail, CECommerce
|
||||
CVerifyTelegram, CVerifyEmail, CECommerce, CShareWithUs
|
||||
} from '@components'
|
||||
import MixinBase from '@src/mixins/mixin-base'
|
||||
import { static_data } from '@src/db/static_data'
|
||||
@@ -37,10 +37,13 @@ import { INotData } from '@src/model'
|
||||
CNextZoom,
|
||||
CVerifyTelegram,
|
||||
CVerifyEmail,
|
||||
CECommerce
|
||||
CECommerce,
|
||||
CShareWithUs
|
||||
}
|
||||
})
|
||||
export default class Home extends MixinBase {
|
||||
public deferredPrompt: any = null
|
||||
public showbuttonHS: boolean = false
|
||||
public text: string = ''
|
||||
public visibile: boolean = false
|
||||
public cardvisible: string = 'hidden'
|
||||
@@ -63,6 +66,7 @@ export default class Home extends MixinBase {
|
||||
public arrvideo_yt = []
|
||||
public arrvideo_mp4 = []
|
||||
|
||||
|
||||
public arrsteps = [
|
||||
{
|
||||
label: '1',
|
||||
@@ -170,6 +174,14 @@ export default class Home extends MixinBase {
|
||||
return UserStore.state.isLogged
|
||||
}
|
||||
|
||||
get isSocio() {
|
||||
return UserStore.state.my.profile.socio
|
||||
}
|
||||
|
||||
get isSocioResidente() {
|
||||
return UserStore.state.my.profile.socioresidente
|
||||
}
|
||||
|
||||
get static_data() {
|
||||
return static_data
|
||||
}
|
||||
@@ -195,13 +207,38 @@ export default class Home extends MixinBase {
|
||||
tools.showNotif(this.$q, String(my))
|
||||
}
|
||||
|
||||
public addtoHomeScreen() {
|
||||
if (!!this.deferredPrompt) {
|
||||
this.deferredPrompt.prompt()
|
||||
// Wait for the user to respond to the prompt
|
||||
this.deferredPrompt.userChoice.then((choiceResult) => {
|
||||
if (choiceResult.outcome === 'accepted') {
|
||||
this.showbuttonHS = false
|
||||
console.log('User accepted the A2HS prompt')
|
||||
} else {
|
||||
console.log('User dismissed the A2HS prompt')
|
||||
}
|
||||
this.deferredPrompt = null
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
public initprompt() {
|
||||
|
||||
window.addEventListener('beforeinstallprompt', (event) => {
|
||||
// console.log('******************************** beforeinstallprompt fired')
|
||||
console.log('******************************** beforeinstallprompt fired')
|
||||
event.preventDefault()
|
||||
// console.log('§§§§§§§§§§§§§§§§§§§§ IMPOSTA DEFERRED PROMPT !!!!!!!!!!!!!!!!! ')
|
||||
// #Todo++ IMPOSTA DEFERRED PROMPT
|
||||
return false
|
||||
|
||||
this.deferredPrompt = event
|
||||
|
||||
// Update UI to notify the user they can add to home screen
|
||||
this.showbuttonHS = true
|
||||
|
||||
})
|
||||
|
||||
window.addEventListener('appinstalled', (evt) => {
|
||||
// Log install to analytics
|
||||
console.log('INSTALL: Success')
|
||||
})
|
||||
|
||||
}
|
||||
@@ -273,7 +310,8 @@ export default class Home extends MixinBase {
|
||||
}
|
||||
|
||||
public openrighttoolbar() {
|
||||
GlobalStore.state.RightDrawerOpen = true
|
||||
GlobalStore.state.rightDrawerOpen = true
|
||||
GlobalStore.state.rightCartOpen = false
|
||||
}
|
||||
|
||||
get TelegCode() {
|
||||
|
||||
Reference in New Issue
Block a user