2022-03-01 23:50:47 +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'
|
2025-03-01 14:14:43 +01:00
|
|
|
import { useI18n } from 'vue-i18n'
|
|
|
|
|
import { tools } from '@tools'
|
2022-03-01 23:50:47 +01:00
|
|
|
import { costanti } from '@store/Modules/costanti'
|
|
|
|
|
import { static_data } from '@src/db/static_data'
|
2025-03-01 14:14:43 +01:00
|
|
|
import { CRegistration } from '@src/components/CRegistration'
|
2022-03-01 23:50:47 +01:00
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
|
name: 'CCheckIfIsLogged',
|
2023-01-05 01:37:25 +01:00
|
|
|
components: { CRegistration },
|
2023-01-12 01:03:19 +01:00
|
|
|
props: {
|
|
|
|
|
showalways: {
|
|
|
|
|
type: Boolean,
|
2023-03-11 01:01:23 +01:00
|
|
|
required: false,
|
2023-01-12 01:03:19 +01:00
|
|
|
default: false,
|
|
|
|
|
},
|
|
|
|
|
},
|
2022-03-01 23:50:47 +01:00
|
|
|
setup(props, { emit }) {
|
|
|
|
|
|
|
|
|
|
const userStore = useUserStore()
|
|
|
|
|
const $router = useRouter()
|
|
|
|
|
const globalStore = useGlobalStore()
|
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
|
2025-10-26 02:47:59 +02:00
|
|
|
const isLogged = computed(() => userStore.isLogged)
|
|
|
|
|
|
2022-11-28 14:00:15 +01:00
|
|
|
const site = ref(globalStore.site)
|
|
|
|
|
|
2022-03-01 23:50:47 +01:00
|
|
|
return {
|
|
|
|
|
userStore,
|
|
|
|
|
tools,
|
|
|
|
|
costanti,
|
|
|
|
|
static_data,
|
2022-11-28 14:00:15 +01:00
|
|
|
site,
|
2025-10-26 02:47:59 +02:00
|
|
|
isLogged,
|
2023-10-01 01:24:55 +02:00
|
|
|
t,
|
2022-03-01 23:50:47 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|