2022-02-12 17:02:10 +01:00
|
|
|
import { defineComponent, ref, computed, PropType, toRef } from 'vue'
|
|
|
|
|
import { useUserStore } from '@store/UserStore'
|
|
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
|
import { useGlobalStore } from '@store/globalStore'
|
|
|
|
|
import { useI18n } from '@/boot/i18n'
|
|
|
|
|
import { tools } from '@store/Modules/tools'
|
2022-03-03 20:31:47 +01:00
|
|
|
import { costanti, IMainCard } from '@store/Modules/costanti'
|
2022-02-12 17:02:10 +01:00
|
|
|
import { CBigBtn } from '@/components/CBigBtn'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
|
name: 'CMainView',
|
|
|
|
|
components: { CBigBtn },
|
|
|
|
|
props: {},
|
|
|
|
|
setup(props, { emit }) {
|
|
|
|
|
|
|
|
|
|
const userStore = useUserStore()
|
|
|
|
|
const $router = useRouter()
|
|
|
|
|
const globalStore = useGlobalStore()
|
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
|
2022-02-19 22:02:54 +01:00
|
|
|
const showInfo = ref(false)
|
|
|
|
|
|
|
|
|
|
const cardsbig = computed(() => {
|
2022-03-03 20:31:47 +01:00
|
|
|
// @ts-ignore
|
|
|
|
|
return costanti.MAINCARDS.filter((rec: IMainCard) => !rec.small && rec.visible)
|
2022-02-19 22:02:54 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const cardssmall = computed(() => {
|
2022-03-03 20:31:47 +01:00
|
|
|
return costanti.MAINCARDS.filter((rec: any) => rec.small && rec.visible)
|
2022-02-19 22:02:54 +01:00
|
|
|
})
|
|
|
|
|
|
2022-02-12 17:02:10 +01:00
|
|
|
return {
|
|
|
|
|
userStore,
|
|
|
|
|
tools,
|
2022-02-19 22:02:54 +01:00
|
|
|
costanti,
|
|
|
|
|
cardsbig,
|
|
|
|
|
cardssmall,
|
|
|
|
|
showInfo,
|
2022-02-12 17:02:10 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|