diff --git a/.env.development b/.env.development index c5ec2b2f..8cb9de1a 100755 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.5.27" +APP_VERSION="0.5.28" SERVICE_WORKER_FILE="service-worker.js" APP_ID="16" DIRECTORY_LOCAL="newfreeplanet" diff --git a/.env.example.production b/.env.example.production index 1566c622..6236468f 100755 --- a/.env.example.production +++ b/.env.example.production @@ -1,4 +1,4 @@ -APP_VERSION="0.5.27" +APP_VERSION="0.5.28" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL=newfreeplanet diff --git a/_ALL_SITES/riso.app/.env.development b/_ALL_SITES/riso.app/.env.development index e647f0a7..c3a222af 100755 --- a/_ALL_SITES/riso.app/.env.development +++ b/_ALL_SITES/riso.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.5.27" +APP_VERSION="0.5.28" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" diff --git a/_ALL_SITES/riso.app/.env.production b/_ALL_SITES/riso.app/.env.production index f1993400..12cf5900 100644 --- a/_ALL_SITES/riso.app/.env.production +++ b/_ALL_SITES/riso.app/.env.production @@ -1,4 +1,4 @@ -APP_VERSION="0.5.27" +APP_VERSION="0.5.28" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL=newfreeplanet diff --git a/_ALL_SITES/riso.app/.env.test b/_ALL_SITES/riso.app/.env.test index 565cd05c..39998fb2 100755 --- a/_ALL_SITES/riso.app/.env.test +++ b/_ALL_SITES/riso.app/.env.test @@ -1,4 +1,4 @@ -APP_VERSION="0.5.27" +APP_VERSION="0.5.28" SERVICE_WORKER_FILE="service-worker.js" APP_ID="16" DIRECTORY_LOCAL=newfreeplanet diff --git a/_ALL_SITES/terradellavisione.app/.env.development b/_ALL_SITES/terradellavisione.app/.env.development index fbde70f6..1a8494ae 100755 --- a/_ALL_SITES/terradellavisione.app/.env.development +++ b/_ALL_SITES/terradellavisione.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.5.27" +APP_VERSION="0.5.28" SERVICE_WORKER_FILE="service-worker.js" APP_ID="14" DIRECTORY_LOCAL="newfreeplanet" diff --git a/src/App.ts b/src/App.ts index c6d813c3..2b19303c 100755 --- a/src/App.ts +++ b/src/App.ts @@ -7,7 +7,7 @@ import { useUserStore } from '@store/UserStore' import { MyHeader } from '@/components/MyHeader' import { MyFooter } from '@/components/MyFooter' import { CFirstPageApp } from '@/components/CFirstPageApp' -import { computed } from 'vue' +import { computed, onMounted, ref, watch } from 'vue' import { CProvaPao } from '@/components/CProvaPao' import { tools } from '@store/Modules/tools' @@ -33,24 +33,59 @@ export default { const finishLoading = computed(() => globalStore.finishLoading) + const site = computed(() => globalStore.site) + + watch(() => finishLoading.value, (newval: boolean, oldval: boolean) => { + console.log('watch finished', newval) + if (newval) { + tools.updateFonts() + } + + }) + const listaRoutingNoLogin = ['/vreg?', '/offline'] function meta() { return { title: t('msg.myAppName'), keywords: [{ name: 'keywords', content: 'associazione shen, centro olistico lugo' }, - { name: 'description', content: t('msg.myAppDescription') }], + { name: 'description', content: t('msg.myAppDescription') }], // equiv: { 'http-equiv': 'Content-Type', 'content': 'text/html; charset=UTF-8' } } } + function isScrolledIntoView (el: any) { + let rect = el.getBoundingClientRect() + let elemTop = rect.top + let elemBottom = rect.bottom + + let isVisible = elemTop < window.innerHeight && elemBottom >= 0 + return isVisible + } + + function scroll() { + window.onscroll = () => { + let scrolledTo = document.querySelector('.replace-with-your-element') + + if (scrolledTo && isScrolledIntoView(scrolledTo)) { + console.log('scrolled') + } + } + } + + function mounted() { + scroll() + } + + + async function created() { try { if (process.env.DEV) { console.info('SESSIONE IN SVILUPPO ! (DEV)') // console.info(process.env) } - if ( tools.isTest() && !process.env.DEV) { + if (tools.isTest() && !process.env.DEV) { console.info('SESSIONE IN TEST ! (TEST)') } else { if (process.env.PROD) { @@ -77,6 +112,9 @@ export default { } else { globalStore.finishLoading = true } + + tools.updateFonts() + } catch (e) { globalStore.finishLoading = true } @@ -85,6 +123,8 @@ export default { // Check the verified_email } + onMounted(mounted) + created() return { diff --git a/src/App.vue b/src/App.vue index 995a23e6..e84d70bc 100755 --- a/src/App.vue +++ b/src/App.vue @@ -1,7 +1,7 @@