change login-page design
This commit is contained in:
@@ -3,6 +3,7 @@ import { computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserStore } from '@/store/userStore'
|
||||
import { getToken } from '@/utils'
|
||||
import { isGuestHomeActive } from '@/utils/guestHome'
|
||||
import HomeSkeleton from '../components/HomeSkeleton.vue'
|
||||
import { getHomeLayoutConfig } from './registry'
|
||||
import { HOME_SECTION_COMPONENTS } from './sections'
|
||||
@@ -16,8 +17,15 @@ const userStore = useUserStore()
|
||||
const { userInfo } = storeToRefs(userStore)
|
||||
const layoutConfig = computed(() => props.layoutConfig ?? getHomeLayoutConfig())
|
||||
|
||||
const isGuestHome = computed(() => isGuestHomeActive())
|
||||
|
||||
const outerSections = computed(() =>
|
||||
(layoutConfig.value.outerSections ?? []).filter((section) => section.visible !== false)
|
||||
(layoutConfig.value.outerSections ?? [])
|
||||
.filter((section) => section.visible !== false)
|
||||
.filter((section) => {
|
||||
if (!isGuestHome.value) return true
|
||||
return section.id !== 'assets' && section.id !== 'boursecuQuickActions'
|
||||
}),
|
||||
)
|
||||
|
||||
const innerSections = computed(() =>
|
||||
@@ -29,7 +37,7 @@ const tailSections = computed(() =>
|
||||
)
|
||||
|
||||
/** محتوا با userInfo — دادههای API در پسزمینه لود میشوند */
|
||||
const showContent = computed(() => Boolean(userInfo.value))
|
||||
const showContent = computed(() => Boolean(userInfo.value) || isGuestHome.value)
|
||||
const showSkeleton = computed(() => Boolean(getToken()) && !userInfo.value)
|
||||
|
||||
function resolveSectionComponent(sectionId: HomeSectionId) {
|
||||
|
||||
Reference in New Issue
Block a user