Files
boursecu_user/src/layouts/mobile/MobileAppLayout.vue
T

56 lines
1.6 KiB
Vue
Raw Normal View History

<template>
2026-07-01 12:49:43 +03:30
<div class="mobile-app-layout">
<div :class="['main-with-bottom-chrome', { 'main-with-bottom-chrome--no-nav': hideMenu }]">
2026-07-01 12:49:43 +03:30
<router-view v-slot="{ Component, route: activeRoute }">
<transition :name="activeRoute.meta.transition || 'fade'">
<component :is="Component" :key="activeRoute.fullPath" class="main-with-bottom-chrome-inner" />
</transition>
</router-view>
</div>
<MobileBottomNav
v-if="!hideMenu"
:is-boursecu="isBoursecu"
:nav-logo="navLogo"
:nav-item-class="navItemClass"
@navigate="navigateTo"
/>
</div>
</template>
<script lang="ts" setup>
2026-07-01 12:49:43 +03:30
import { computed, onMounted, watch } from 'vue'
import { useRoute } from 'vue-router'
import { useConfigStore } from '@/store/configStore'
import { getProjectMobileNavLogo, isBoursecuProject } from '@/utils/config'
import { useAppNavigation } from '../composables/useAppNavigation'
2026-07-01 12:49:43 +03:30
import { recoverMobileViewportAfterAuth, resetMobileAppScroll } from '../composables/useMobileScrollReset'
import MobileBottomNav from './MobileBottomNav.vue'
const config = useConfigStore()
2026-07-01 12:49:43 +03:30
const route = useRoute()
const isBoursecu = isBoursecuProject()
const navLogo = computed(() => getProjectMobileNavLogo(config.config?.avatar))
const {
hideMenu,
navItemClass,
navigateTo,
} = useAppNavigation()
2026-07-01 12:49:43 +03:30
watch(
() => route.fullPath,
() => {
resetMobileAppScroll()
},
{ flush: 'post' },
)
onMounted(() => {
resetMobileAppScroll()
recoverMobileViewportAfterAuth()
})
</script>
<style lang="less" src="./mobile-layout.less"></style>