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