other components... (2)
This commit is contained in:
16
src/components/CVideoPromo/CVideoPromo.scss
Executable file
16
src/components/CVideoPromo/CVideoPromo.scss
Executable file
@@ -0,0 +1,16 @@
|
||||
.lista {
|
||||
text-align: left;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.step{
|
||||
font-size: 1.15rem;
|
||||
font-weight: bold;
|
||||
color: blue;
|
||||
line-height: 1.75rem;
|
||||
letter-spacing: .01em;
|
||||
}
|
||||
|
||||
.grass{
|
||||
font-weight: bold;
|
||||
}
|
||||
63
src/components/CVideoPromo/CVideoPromo.ts
Executable file
63
src/components/CVideoPromo/CVideoPromo.ts
Executable file
@@ -0,0 +1,63 @@
|
||||
import { defineComponent, ref } from 'vue'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { CMyPage } from '@/components/CMyPage'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CVideo } from '@/components/CVideo'
|
||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||
import { CImgText } from '@/components/CImgText'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CVideoPromo',
|
||||
props: {
|
||||
showconditions: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
components: { CMyPage, CTitleBanner, CImgText, CMyFieldDb, CVideo },
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const msg = ref('')
|
||||
const accetta_saw_video = ref(false)
|
||||
|
||||
function created() {
|
||||
aggiorna()
|
||||
}
|
||||
|
||||
function aggiorna() {
|
||||
accetta_saw_video.value = tools.isBitActive(userStore.my.profile.saw_and_accepted, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI.value)
|
||||
}
|
||||
|
||||
function changeval(value: any) {
|
||||
if (value)
|
||||
userStore.my.profile.saw_and_accepted = tools.SetBit(userStore.my.profile.saw_and_accepted, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI.value)
|
||||
else
|
||||
userStore.my.profile.saw_and_accepted = tools.UnSetBit(userStore.my.profile.saw_and_accepted, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI.value)
|
||||
|
||||
const mydata = {
|
||||
'profile.saw_and_accepted': userStore.my.profile.saw_and_accepted
|
||||
}
|
||||
|
||||
tools.saveFieldToServer($q, 'users', userStore.my._id, mydata)
|
||||
}
|
||||
|
||||
created()
|
||||
|
||||
return {
|
||||
msg,
|
||||
accetta_saw_video,
|
||||
changeval,
|
||||
aggiorna,
|
||||
}
|
||||
}
|
||||
})
|
||||
44
src/components/CVideoPromo/CVideoPromo.vue
Executable file
44
src/components/CVideoPromo/CVideoPromo.vue
Executable file
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<CTitleBanner :title="`Video ` + $t('site.sitename')"></CTitleBanner>
|
||||
<CImgText src="">
|
||||
|
||||
<CTitleBanner
|
||||
class="q-pa-xs" :title="$t('steps.video_intro_1', {sitename: $t('ws.sitename')})"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad" canopen="true" :visible="true">
|
||||
|
||||
<div v-if="showconditions">
|
||||
<CVideo myvideokey="DWfQzbOCK3s"></CVideo>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="toolsext.isLang('it')">
|
||||
<CVideo myvideokey=""></CVideo>
|
||||
</div>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
|
||||
<div v-if="showconditions">
|
||||
<q-checkbox
|
||||
class="bg-grey-4"
|
||||
v-model="accetta_saw_video"
|
||||
@input="changeval"
|
||||
color="primary"
|
||||
:label="$t('steps.saw_video_intro')">
|
||||
|
||||
</q-checkbox>
|
||||
</div>
|
||||
|
||||
|
||||
</CImgText>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CVideoPromo.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CVideoPromo';
|
||||
</style>
|
||||
1
src/components/CVideoPromo/index.ts
Executable file
1
src/components/CVideoPromo/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CVideoPromo} from './CVideoPromo.vue'
|
||||
Reference in New Issue
Block a user