2026-06-14 10:08:46 +03:30
|
|
|
<template>
|
2026-07-01 12:49:43 +03:30
|
|
|
<div class="mobile-app-layout">
|
2026-06-14 10:08:46 +03:30
|
|
|
<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" />
|
2026-06-14 10:08:46 +03:30
|
|
|
</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'
|
2026-06-14 10:08:46 +03:30
|
|
|
import { useConfigStore } from '@/store/configStore'
|
2026-06-16 10:32:10 +03:30
|
|
|
import { getProjectMobileNavLogo, isBoursecuProject } from '@/utils/config'
|
2026-06-14 10:08:46 +03:30
|
|
|
import { useAppNavigation } from '../composables/useAppNavigation'
|
2026-07-01 12:49:43 +03:30
|
|
|
import { recoverMobileViewportAfterAuth, resetMobileAppScroll } from '../composables/useMobileScrollReset'
|
2026-06-14 10:08:46 +03:30
|
|
|
import MobileBottomNav from './MobileBottomNav.vue'
|
|
|
|
|
|
|
|
|
|
const config = useConfigStore()
|
2026-07-01 12:49:43 +03:30
|
|
|
const route = useRoute()
|
2026-06-14 10:08:46 +03:30
|
|
|
const isBoursecu = isBoursecuProject()
|
2026-06-16 10:32:10 +03:30
|
|
|
const navLogo = computed(() => getProjectMobileNavLogo(config.config?.avatar))
|
2026-06-14 10:08:46 +03:30
|
|
|
|
|
|
|
|
const {
|
|
|
|
|
hideMenu,
|
|
|
|
|
navItemClass,
|
|
|
|
|
navigateTo,
|
|
|
|
|
} = useAppNavigation()
|
2026-07-01 12:49:43 +03:30
|
|
|
|
|
|
|
|
watch(
|
|
|
|
|
() => route.fullPath,
|
|
|
|
|
() => {
|
|
|
|
|
resetMobileAppScroll()
|
|
|
|
|
},
|
|
|
|
|
{ flush: 'post' },
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
resetMobileAppScroll()
|
|
|
|
|
recoverMobileViewportAfterAuth()
|
|
|
|
|
})
|
2026-06-14 10:08:46 +03:30
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less" src="./mobile-layout.less"></style>
|