ui changes
This commit is contained in:
@@ -37,13 +37,7 @@ const showSkeleton = computed(() => Boolean(getToken()) && !userInfo.value)
|
||||
<HomeSkeleton v-if="showSkeleton" />
|
||||
|
||||
<template v-if="showContent">
|
||||
<DesktopAssetsMetrics
|
||||
v-if="!ctx.isGaroosi.value"
|
||||
@open-gold-modal="ctx.openGoldModal"
|
||||
@open-rial-modal="ctx.openRialModal"
|
||||
/>
|
||||
|
||||
<section class="dhome-hero-row">
|
||||
<section v-if="ctx.isGaroosi.value" class="dhome-hero-row">
|
||||
<DesktopLivePrice />
|
||||
<DesktopPriceRange />
|
||||
</section>
|
||||
@@ -74,6 +68,17 @@ const showSkeleton = computed(() => Boolean(getToken()) && !userInfo.value)
|
||||
|
||||
<template v-else>
|
||||
<DesktopDefaultActions />
|
||||
|
||||
<DesktopAssetsMetrics
|
||||
@open-gold-modal="ctx.openGoldModal"
|
||||
@open-rial-modal="ctx.openRialModal"
|
||||
/>
|
||||
|
||||
<section class="dhome-hero-row">
|
||||
<DesktopLivePrice />
|
||||
<DesktopPriceRange />
|
||||
</section>
|
||||
|
||||
<section
|
||||
v-if="ctx.bannerEnabled.value && ctx.banners.value?.length"
|
||||
class="dhome-surface dhome-chart-banner-combined"
|
||||
|
||||
@@ -24,6 +24,10 @@ const innerSections = computed(() =>
|
||||
layoutConfig.value.sections.filter((section) => section.visible !== false)
|
||||
)
|
||||
|
||||
const tailSections = computed(() =>
|
||||
(layoutConfig.value.tailSections ?? []).filter((section) => section.visible !== false)
|
||||
)
|
||||
|
||||
/** محتوا با userInfo — دادههای API در پسزمینه لود میشوند */
|
||||
const showContent = computed(() => Boolean(userInfo.value))
|
||||
const showSkeleton = computed(() => Boolean(getToken()) && !userInfo.value)
|
||||
@@ -56,6 +60,12 @@ function resolveSectionComponent(sectionId: HomeSectionId) {
|
||||
:key="section.id"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<component
|
||||
:is="resolveSectionComponent(section.id)"
|
||||
v-for="section in tailSections"
|
||||
:key="`tail-${section.id}`"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<HomeSkeleton v-else-if="showSkeleton" class="w-full" />
|
||||
|
||||
@@ -3,12 +3,14 @@ import type { HomeLayoutConfig } from '../types'
|
||||
/** چیدمان پیشفرض — همه پروژهها بهجز boursecu */
|
||||
export const defaultHomeLayoutConfig: HomeLayoutConfig = {
|
||||
id: 'default',
|
||||
wrapperClass: 'p-1 from-primary rounded-lg p-px to-transparent mt-5',
|
||||
wrapperClass: 'p-1 shadow-lg from-primary rounded-lg p-px to-transparent mt-5',
|
||||
sections: [
|
||||
{ id: 'garoosiAssets' },
|
||||
{ id: 'assets' },
|
||||
{ id: 'mainActions' },
|
||||
{ id: 'referral' },
|
||||
{ id: 'assets' },
|
||||
],
|
||||
tailSections: [
|
||||
{ id: 'marketClosed' },
|
||||
{ id: 'currentPrice' },
|
||||
{ id: 'banners' },
|
||||
|
||||
@@ -31,6 +31,8 @@ export interface HomeLayoutConfig {
|
||||
wrapperClass?: string
|
||||
outerSections?: HomeLayoutSectionConfig[]
|
||||
sections: HomeLayoutSectionConfig[]
|
||||
/** بعد از wrapper — مثل قیمت و نمودار در UI قدیمی */
|
||||
tailSections?: HomeLayoutSectionConfig[]
|
||||
}
|
||||
|
||||
export interface HomeActionItem {
|
||||
|
||||
Reference in New Issue
Block a user