Animations, Policy, Toolbar Colors
This commit is contained in:
46
src/App.ts
46
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 {
|
||||
|
||||
Reference in New Issue
Block a user