forked from Ivasoft/geovisio-website
46 lines
1.2 KiB
Vue
46 lines
1.2 KiB
Vue
<script setup lang="ts">
|
|
import { ref, computed } from 'vue'
|
|
import Header from '@/components/Header.vue'
|
|
import Footer from '@/components/Footer.vue'
|
|
import { RouterView } from 'vue-router'
|
|
import { useI18n } from 'vue-i18n'
|
|
import { hasASessionCookieDecoded } from '@/utils/auth'
|
|
import authConfig from './composables/auth'
|
|
const { authConf } = authConfig()
|
|
const { t } = useI18n()
|
|
|
|
let focusMap = ref<string>('focus-map')
|
|
|
|
function setFocusMap(value: string) {
|
|
focusMap.value = value
|
|
}
|
|
const isLogged = computed((): boolean => {
|
|
const cookie = hasASessionCookieDecoded()
|
|
return !!(cookie && cookie.account)
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<metainfo>
|
|
<template v-slot:title="{ content }">{{ content }}</template>
|
|
</metainfo>
|
|
<Header
|
|
:auth-enabled="
|
|
authConf && authConf.auth && authConf.auth.enabled
|
|
? authConf.auth.enabled
|
|
: true
|
|
"
|
|
:user-profile-url="
|
|
authConf &&
|
|
authConf.auth &&
|
|
authConf.auth.user_profile &&
|
|
authConf.auth.user_profile.url
|
|
? authConf.auth.user_profile.url
|
|
: ''
|
|
"
|
|
/>
|
|
<RouterView @trigger="setFocusMap" :class="{ logged: isLogged }" />
|
|
<Footer v-if="!isLogged" />
|
|
</template>
|
|
<style scoped></style>
|