This commit is contained in:
Paolo Arena
2021-01-18 00:47:30 +01:00
parent d31a5e88ec
commit 316ebbb78b
30 changed files with 279 additions and 87 deletions

View File

@@ -306,12 +306,17 @@ module.exports = function (ctx) {
background_color: '#ffffff',
icons: [
{
'src': 'statics/icons/android-chrome-192x192.png',
'sizes': '192x192',
'src': 'statics/icons/android-chrome-36x36.png',
'sizes': '36x36',
'type': 'image/png'
},
{
'src': 'statics/icons/android-chrome-512x512',
'src': 'statics/icons/android-chrome-96x96.png',
'sizes': '96x96',
'type': 'image/png'
},
{
'src': 'statics/icons/android-chrome-512x512.png',
'sizes': '512x512',
'type': 'image/png'
}

View File

@@ -24,6 +24,9 @@ register(process.env.SERVICE_WORKER_FILE, {
},
updated(registration) {
console.log('New content is available; please refresh.')
document.dispatchEvent(
new CustomEvent('swUpdated', { detail: registration })
)
},
offline() {
console.log('No internet connection found. App is running in offline mode.')

View File

@@ -262,7 +262,6 @@ $heightBtn: 100%;
.text-sobig {
font-size: 1.50rem;
}
}
.my-card {
@@ -274,6 +273,14 @@ $heightBtn: 100%;
box-shadow: none;
}
.my-card-big {
width: 100%;
max-width: 400px;
padding: 1rem 1rem;
box-shadow: none;
}
.text-trans {
opacity: 0.9;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";
@@ -741,6 +748,13 @@ $heightBtn: 100%;
padding: 6px;
}
.clBorderShare {
border-radius: 32px;
font-size: 1rem;
padding: 6px;
border: #666cf6 solid 3px;
}
.clBorderImportant, .clBorderSteps {
border: red solid 5px;
border-radius: 16px;
@@ -910,10 +924,16 @@ $heightBtn: 100%;
position:relative;
}
.myheader {
padding:5px;
padding: 5px;
@media (max-width: 500px) {
padding: 1px;
}
}
#mybody {
padding:5px;
padding: 5px;
@media (max-width: 500px) {
padding: 1px;
}
}
.myfooter{

View File

@@ -8,13 +8,13 @@ import { Header } from './components/Header'
import globalroutines from './globalroutines/index'
import { GlobalStore } from './store/Modules'
import { toolsext } from '@src/store/Modules/toolsext'
import { BannerCookies, CPreloadImages, CTesseraElettronica } from '@components'
import { BannerCookies, CPreloadImages } from '@components'
import { static_data } from '@src/db/static_data'
@Component({
components: {
appHeader: Header,
BannerCookies, CPreloadImages, CTesseraElettronica
BannerCookies, CPreloadImages
},
router
})

View File

@@ -10,7 +10,7 @@
</CPreloadImages>
<q-page-container id="mypage" >
<q-page-container id="mypage">
<div v-if="finishLoading">
<transition name="fade" mode="out-in">
<router-view/>
@@ -31,5 +31,5 @@
<script lang="ts" src="./App.ts">
</script>
<style lang="scss">
@import './App';
@import './App';
</style>

View File

@@ -16,6 +16,10 @@ const msg_website_it = {
projects: 'Progetti',
producer: 'Produttore',
products: 'Prodotti',
collabora: 'Collabora',
storehouses: 'Magazzino',
sharewithus: 'Condividi con Noi',
checkout: 'Carrello',
payment: 'Pagamenti',
regok: 'Registrazione Confermata',
presentazione: 'Presentazione',
@@ -66,7 +70,9 @@ const msg_website_it = {
people: 'Inv.',
peoplelegend: 'Numero d\'Invitati'
},
admin_ecommerce: 'ECommerce',
ecommerce: 'E-Commerce',
ecommerce_menu: 'ECommerce1'
},
msg: {

View File

@@ -24,6 +24,7 @@ const functionality: IFunctionality = {
SHOW_MESSAGES: false,
BOOKING_EVENTS: true,
ENABLE_ECOMMERCE: true,
ENABLE_REG_CNM: true,
}
const routes_admin: IListRoutes[] = [
@@ -52,6 +53,19 @@ const routes_admin: IListRoutes[] = [
inmenu: true,
submenu: true,
onlyAdmin: true
},
{
active: true,
order: 1030,
path: '/admin/sendpushnotif',
materialIcon: 'event_seat',
name: 'otherpages.manage.sendpushnotif',
component: () => import('@/rootgen/admin/sendpushnotif/sendpushnotif.vue'),
level_parent: 0.0,
level_child: 0.5,
inmenu: true,
submenu: true,
onlyAdmin: true
}
]
@@ -132,13 +146,25 @@ const routes_ecommerce: IListRoutes[] = [
level_parent: 0,
level_child: 0.5,
},
{
active: true,
order: 30,
path: '/orderinfo',
materialIcon: 'fas fa-shopping-cart',
name: 'pages.orderinfo',
component: () => import('@/views/ecommerce/orderInfo/orderInfo.vue'),
inmenu: true,
submenu: true,
level_parent: 0,
level_child: 0.5,
},
]
const routes_admin_ecommerce: IListRoutes[] = [
{
active: true,
order: 30,
path: '/admin/products',
path: '/admin/ecommerce/products',
materialIcon: 'fas fa-file-alt',
name: 'pages.products',
component: () => import('@/rootgen/admin/products/products.vue'),
@@ -152,7 +178,7 @@ const routes_admin_ecommerce: IListRoutes[] = [
{
active: true,
order: 30,
path: '/admin/producers',
path: '/admin/ecommerce/producers',
materialIcon: 'fas fa-file-alt',
name: 'pages.producer',
component: () => import('@/rootgen/admin/producer/producer.vue'),
@@ -166,7 +192,7 @@ const routes_admin_ecommerce: IListRoutes[] = [
{
active: true,
order: 30,
path: '/admin/storehouses',
path: '/admin/ecommerce/storehouses',
materialIcon: 'fas fa-file-alt',
name: 'pages.storehouses',
component: () => import('@/rootgen/admin/storehouses/storehouses.vue'),
@@ -180,6 +206,36 @@ const routes_admin_ecommerce: IListRoutes[] = [
]
const routes_admin_ecommerce_menu: IListRoutes[] = [
{
active: true,
order: 30,
path: '/admin/ecommerce/products',
name: 'pages.products',
component: () => import('@/rootgen/admin/products/products.vue'),
inmenu: false,
infooter: false,
},
{
active: true,
order: 31,
path: '/admin/ecommerce/producers',
name: 'pages.producer',
component: () => import('@/rootgen/admin/producer/producer.vue'),
inmenu: false,
infooter: false,
},
{
active: true,
order: 32,
path: '/admin/ecommerce/storehouses',
name: 'pages.storehouses',
component: () => import('@/rootgen/admin/storehouses/storehouses.vue'),
infooter: false,
},
]
const routes_newsletter: IListRoutes[] = [
{
active: true,
@@ -298,7 +354,39 @@ const routes_manager: IListRoutes[] = [
},
{
active: true,
order: 30,
path: '/admin/newsletter',
order: 60,
faIcon: 'fa fa-list-alt',
materialIcon: 'fas fa-users',
name: 'otherpages.admin.newsletter',
routes2: routes_newsletter,
inmenu: false,
submenu: true,
level_parent: 0.5,
level_child: 0.5,
solotitle: true,
onlyAdmin: true,
onlyManager: true
},
{
active: functionality.ENABLE_ECOMMERCE,
path: '/admin/ecommerce',
order: 31,
faIcon: 'fa fa-list-alt',
materialIcon: 'next_week',
name: 'pages.admin_ecommerce',
routes2: routes_admin_ecommerce,
inmenu: false,
submenu: true,
level_parent: 0.5,
level_child: 0.5,
solotitle: true,
onlyAdmin: true,
onlyManager: true
},
{
active: true,
order: 35,
path: '/admin/msg_template',
materialIcon: 'fas fa-file-alt',
name: 'msgs.messages',
@@ -339,37 +427,6 @@ const routes_manager: IListRoutes[] = [
onlyAdmin: true,
onlyManager: true
},
{
active: true,
order: 60,
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,
onlyAdmin: true,
onlyManager: true
},
{
active: functionality.ENABLE_ECOMMERCE,
path: '',
order: 65,
faIcon: 'fa fa-list-alt',
materialIcon: 'next_week',
name: 'pages.ecommerce',
routes2: routes_admin_ecommerce,
inmenu: true,
submenu: true,
level_parent: 0.5,
level_child: 0.5,
solotitle: true,
onlyAdmin: true,
onlyManager: true
},
{
active: functionality.BOOKING_EVENTS,
order: 70,
@@ -427,6 +484,17 @@ const baseroutes: IListRoutes[] = [
inmenu: false,
infooter: false
},
{
active: true,
order: 1000,
path: '/product/:codprod',
materialIcon: 'event',
name: 'otherpages.product',
component: () => import('@/views/ecommerce/productInfo/productInfo.vue'),
inmenu: false,
infooter: false
},
...routes_admin_ecommerce_menu,
{
active: true,
order: 1000,
@@ -516,7 +584,7 @@ const baseroutes: IListRoutes[] = [
path: '/signup',
materialIcon: 'how_to_reg',
name: 'pages.SignUp',
component: () => import('@/views/login/signup_complete/signup_complete.vue'),
component: () => import('@/views/login/signup/signup.vue'),
inmenu: false,
infooter: false,
separator: false
@@ -589,7 +657,8 @@ export const routes = baseroutes
const preLoadImages: IPreloadImages[] = [
{ imgname: '../../statics/images/logo.png', alt: 'logo', mobile: false },
{ imgname: '../../statics/icons/flag_it.svg', alt: 'flag it', mobile: false }
{ imgname: '../../statics/icons/flag_it.svg', alt: 'flag it', mobile: false },
{ imgname: '../../statics/icons/flag_uk.svg', alt: 'flag en', mobile: false }
// { imgname: '../../statics/images/background.jpg', alt: 'corsi di formazione per operatori del massaggio del benessere', mobile: true },
// { imgname: '../../statics/images/background2.jpg', alt: 'stanza con cuscini per seminario reiki', mobile: true },
// { imgname: '../../statics/images/background3.jpg', alt: 'foto di gruppo seminaristi reiki', mobile: true },
@@ -601,13 +670,13 @@ export function preloadedimages() {
}
const arrLangUsed = [
'it',
'enUs'
'it'
// 'enUs'
]
const lang_available: ILang[] = [
{ label: 'Italiano', icon: 'fa-flag-it', value: 'it', image: '../statics/icons/flag_it.svg', short: 'IT' },
{ label: 'English', icon: 'fa-flag-us', value: 'enUs', image: '../statics/icons/flag_gb.svg', short: 'EN' }
// { label: 'English', icon: 'fa-flag-us', value: 'enUs', image: '../statics/icons/flag_gb.svg', short: 'EN' }
// { label: 'German', icon: 'fa-flag-de', value: 'de', image: '../statics/images/de.png', short: 'DE' },
]

View File

@@ -505,3 +505,6 @@ body.mobile .landing:before {
background-repeat: no-repeat;
background-position: 50%;
}
.add-button {
}

View File

@@ -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() {

View File

@@ -57,6 +57,9 @@
@input="changetab"
>
<q-tab name="guida" icon="fas fa-check" :label="$t('pages.home')"></q-tab>
<q-tab v-if="isLogged && isSocio" name="prodotti" icon="fas fa-shopping-cart"
:label="$t('pages.products')"></q-tab>
<q-tab v-if="isLogged" name="collabora" icon="fas fa-users" :label="$t('pages.collabora')"></q-tab>
<!--<q-tab name="zoom" icon="fas fa-video" :label="$t('pages.nextzoom')"></q-tab>-->
<!--<q-tab name="statistiche" icon="fas fa-chart-line" :label="$t('pages.status')"></q-tab>-->
@@ -64,9 +67,58 @@
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="guida">
<div class="q-ma-xs q-pa-xs text-center rounded-borders">
<div v-if="isLogged">
<div>
<!--<q-field-->
<!--v-if="getPermission() === 'granted'"-->
<!--icon="notifications"-->
<!--class="shadow"-->
<!--:label="$t('notification.titlegranted')"-->
<!--:helper="$t('notification.statusnot')">-->
<!--</q-field>-->
<q-field
v-if="NotServiceWorker()"
class="shadow"
icon="notifications"
label="Service Worker not present"
>
</q-field>
</div>
<div>
<q-btn v-if="getPermission() !== 'granted'"
class="enable-notifications shadow"
color="primary" rounded
size="md"
icon="notifications" @click="tools.askfornotification(mythis)"
:label="$t('notification.ask')"/>
<!--<q-btn v-if="getPermission() === 'granted'" class="enable-notifications" color="primary" rounded size="lg" icon="notifications" @click="showNotificationExample" label="Send Notification"/>-->
<!--<q-btn v-if="getPermission() === 'granted'" class="enable-notifications" color="secondary" rounded size="lg" icon="notifications" @click="createPushSubscription" label="Create Push Subscription !"/>-->
</div>
</div>
<q-btn class="enable-notifications shadow add-button" v-if="showbuttonHS" @click="addtoHomeScreen"
color="primary" rounded
size="md"
icon="fas fa-plus"
label="Aggiungi alle tue Applicazioni">
</q-btn>
<div class="q-pt-md q-pl-sm">
<div class="text-body2 text-italic text-grey">Versione App {{ getenv('APP_VERSION') }}</div>
</div>
</div>
</q-tab-panel>
<q-tab-panel name="prodotti">
<CECommerce>
</CECommerce>
</q-tab-panel>
<q-tab-panel name="collabora">
<CShareWithUs></CShareWithUs>
</q-tab-panel>
<q-tab-panel name="zoom">
@@ -83,10 +135,6 @@
</q-tab-panel>
</q-tab-panels>
<CECommerce>
</CECommerce>
</div>
</CMyPage>
@@ -97,5 +145,5 @@
</script>
<style lang="scss" scoped>
@import './home.scss';
@import './home.scss';
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 27 KiB

0
src/statics/images/prodotti.jpg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 808 KiB

After

Width:  |  Height:  |  Size: 808 KiB

0
src/statics/images/products/arance.jpg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

0
src/statics/images/products/pane.jpg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB