58 lines
1.6 KiB
Vue
58 lines
1.6 KiB
Vue
<template>
|
|||
|
|
<div>
|
||
|
|
<MobileOverflowMenu
|
||
|
|
:visible="popVisible"
|
||
|
|
:overflow-items="overflowItems"
|
||
|
|
@close="closeOverflowMenu"
|
||
|
|
@navigate="navigateTo"
|
||
|
|
/>
|
||
|
|
|
||
|
|
<div :class="['main-with-bottom-chrome', { 'main-with-bottom-chrome--no-nav': hideMenu }]">
|
||
|
|
<router-view v-slot="{ Component, route }">
|
||
|
|
<transition :name="route.meta.transition || 'fade'">
|
||
|
|
<component :is="Component" 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"
|
||
|
|
@toggle-overflow="toggleOverflowMenu"
|
||
|
|
/>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script lang="ts" setup>
|
||
|
|
import { computed } from 'vue'
|
||
|
|
import { useConfigStore } from '@/store/configStore'
|
||
|
|
import { getProjectNavLogo, isBoursecuProject } from '@/utils/config'
|
||
|
|
import { SECONDARY_NAV } from '../config/navigation'
|
||
|
|
import { useAppNavigation } from '../composables/useAppNavigation'
|
||
|
|
import MobileBottomNav from './MobileBottomNav.vue'
|
||
|
|
import MobileOverflowMenu from './MobileOverflowMenu.vue'
|
||
|
|
|
||
|
|
const config = useConfigStore()
|
||
|
|
const isBoursecu = isBoursecuProject()
|
||
|
|
const navLogo = computed(() => getProjectNavLogo(config.config?.avatar))
|
||
|
|
|
||
|
|
const {
|
||
|
|
popVisible,
|
||
|
|
hideMenu,
|
||
|
|
navItemClass,
|
||
|
|
navigateTo,
|
||
|
|
toggleOverflowMenu,
|
||
|
|
closeOverflowMenu,
|
||
|
|
} = useAppNavigation()
|
||
|
|
|
||
|
|
const overflowItems = [
|
||
|
|
{ id: 'user', routeName: 'user', label: 'حساب کاربری', icon: 'vuesax-linear:user' },
|
||
|
|
...SECONDARY_NAV,
|
||
|
|
]
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="less" src="./mobile-layout.less"></style>
|