++ Animation fixed in Home pic.

++"Dark Mode"
This commit is contained in:
Surya Paolo
2022-11-23 23:57:21 +01:00
parent 46bf74e9e2
commit fab0dbbb72
17 changed files with 722 additions and 232 deletions

View File

@@ -2,7 +2,7 @@ import {
defineComponent, onMounted, PropType, ref, toRef, watch,
} from 'vue'
import { IImgGallery, ILabelValue, IMyCard, IMyElem, IMyPage, IOperators } from '@src/model'
import { IElemText, IImgGallery, ILabelValue, IMyCard, IMyElem, IMyPage, IOperators } from '@src/model'
import { useGlobalStore } from '@store/globalStore'
import { CImgTitle } from '@/components/CImgTitle'
@@ -74,6 +74,7 @@ export default defineComponent({
const slide = ref(0)
const slide2 = ref(0)
const tabCard = ref('card0')
const tabElemsText = ref('elem0')
const arrPages = ref([] as any[])
const disableSave = ref(true)
const enableEdit = ref(true)
@@ -202,6 +203,14 @@ export default defineComponent({
modifElem()
}
function addNewElemText() {
if (!myel.value.elemsText)
myel.value.elemsText = []
myel.value.elemsText.push({ _id: objectId(), text: '', color: '#ffffff', class: '', size: '', anim: { name: 'FadeIn', clduration: '', cldelay: '', timingtype: 'ease-in-out'} })
modifElem()
}
function getClass() {
let mycl = ''
if (props.myelem.align === shared_consts.ALIGNTYPE.CEHTER) {
@@ -222,10 +231,15 @@ export default defineComponent({
return false
}
function delRecCard(idcard: string, myel: IMyElem) {
function delRecCard(id: string, myel: IMyElem) {
//
if (myel.listcards)
myel.listcards = myel.listcards.filter((card: IMyCard) => card._id !== idcard)
if (props.myelem.type === shared_consts.ELEMTYPE.CARD) {
if (myel.listcards)
myel.listcards = myel.listcards.filter((card: IMyCard) => card._id !== id)
} else if (props.myelem.type === shared_consts.ELEMTYPE.IMGPOSTER) {
if (myel.elemsText)
myel.elemsText = myel.elemsText.filter((rec: IElemText) => rec._id !== id)
}
}
@@ -238,6 +252,14 @@ export default defineComponent({
}
})
}
} else if (props.myelem.type === shared_consts.ELEMTYPE.IMGPOSTER) {
if (props.myelem.elemsText) {
props.myelem.elemsText.forEach((rec: IElemText) => {
if (recpass._id === rec._id) {
rec.text = myval
}
})
}
} else if ((props.myelem.type === shared_consts.ELEMTYPE.IMGTITLE) ||
(props.myelem.type === shared_consts.ELEMTYPE.IMAGE)) {
myel.value.image = myval
@@ -290,6 +312,7 @@ export default defineComponent({
dupElem,
enableEdit,
addNewCard,
addNewElemText,
arrPages,
costanti,
delRecCard,
@@ -297,6 +320,7 @@ export default defineComponent({
updateElem,
showAnimation,
tabCard,
tabElemsText,
}
},