Sync live quote handling, SSE product images, store hours, file URL normalization, PWA icon cache, TV monitor, about software, SuperAdmin menu gates, price alerts, and related UX from modular while preserving boursecu branding and config constraints. Co-authored-by: Cursor <cursoragent@cursor.com>
78 lines
2.4 KiB
Vue
78 lines
2.4 KiB
Vue
<template>
|
|
<aside class="desktop-sidebar desktop-sidebar--boursecu">
|
|
<div class="desktop-sidebar__brand">
|
|
<img
|
|
:src="navLogo"
|
|
alt=""
|
|
class="desktop-sidebar__logo"
|
|
/>
|
|
</div>
|
|
|
|
<div class="desktop-sidebar__nav-scroll">
|
|
<nav class="desktop-sidebar__section" aria-label="منوی اصلی">
|
|
<DesktopNavItem
|
|
v-for="item in primaryItems"
|
|
:key="item.id"
|
|
:icon="item.icon"
|
|
:icon-src="item.iconSrc"
|
|
:label="item.label"
|
|
:active="isNavActive(item.routeName)"
|
|
@click="navigateTo(item.routeName)"
|
|
/>
|
|
</nav>
|
|
|
|
<div class="desktop-sidebar__divider" />
|
|
|
|
<nav class="desktop-sidebar__section desktop-sidebar__section--secondary" aria-label="منوی فرعی">
|
|
<DesktopNavItem
|
|
v-for="item in secondaryItems"
|
|
:key="item.id"
|
|
:icon="item.icon"
|
|
:icon-src="item.iconSrc"
|
|
:label="item.label"
|
|
:active="isNavActive(item.routeName)"
|
|
@click="navigateTo(item.routeName)"
|
|
/>
|
|
</nav>
|
|
</div>
|
|
|
|
<div class="desktop-sidebar__credit">
|
|
<AppCreditLink variant="sidebar" />
|
|
</div>
|
|
</aside>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { computed } from 'vue'
|
|
import { useConfigStore } from '@/store/configStore'
|
|
import { useSettingsStore } from '@/store/settingsStore'
|
|
import { getProjectSplashLogo } from '@/utils/config'
|
|
import { featureSettingForRoute } from '@/utils/superAdminMenuGates'
|
|
import { getPrimaryNavItems, SECONDARY_NAV } from '../config/navigation'
|
|
import { useAppNavigation } from '../composables/useAppNavigation'
|
|
import DesktopNavItem from './DesktopNavItem.vue'
|
|
import AppCreditLink from '@/components/AppCreditLink.vue'
|
|
|
|
const config = useConfigStore()
|
|
const settingsStore = useSettingsStore()
|
|
const navLogo = computed(() => getProjectSplashLogo(config.config?.avatar))
|
|
|
|
const primaryItems = computed(() =>
|
|
getPrimaryNavItems().filter((item) => {
|
|
const featureKey = featureSettingForRoute(item.routeName)
|
|
if (featureKey) return settingsStore.isSettingTruthy(featureKey)
|
|
return true
|
|
}),
|
|
)
|
|
|
|
const secondaryItems = computed(() =>
|
|
SECONDARY_NAV.filter((item) => {
|
|
const featureKey = featureSettingForRoute(item.routeName)
|
|
if (featureKey) return settingsStore.isSettingTruthy(featureKey)
|
|
return true
|
|
}),
|
|
)
|
|
|
|
const { isNavActive, navigateTo } = useAppNavigation()
|
|
</script>
|