Add layout shells, desktop views, module-level page caches, and UI fixes for auth, home, wallet, transactions, address, and related pages. Co-authored-by: Cursor <cursoragent@cursor.com>
52 lines
1.7 KiB
Vue
52 lines
1.7 KiB
Vue
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import { useUserStore } from '@/store/userStore'
|
|
import { loading } from '@/utils'
|
|
import { useHomePageContext } from '../../composables/useHomePage'
|
|
import HomeSkeleton from '../../components/HomeSkeleton.vue'
|
|
import DesktopHomeShell from '../components/DesktopHomeShell.vue'
|
|
import DesktopHomeTopbar from '../components/DesktopHomeTopbar.vue'
|
|
import DesktopHomeAlerts from '../components/DesktopHomeAlerts.vue'
|
|
import DesktopLivePrice from '../components/DesktopLivePrice.vue'
|
|
import DesktopPriceRange from '../components/DesktopPriceRange.vue'
|
|
import DesktopAssetsMetrics from '../components/DesktopAssetsMetrics.vue'
|
|
import DesktopChartSection from '../components/DesktopChartSection.vue'
|
|
import DesktopQuickActionsPanel from '../components/DesktopQuickActionsPanel.vue'
|
|
|
|
defineEmits<{
|
|
logout: []
|
|
}>()
|
|
|
|
const userStore = useUserStore()
|
|
const ctx = useHomePageContext()
|
|
|
|
const showSkeleton = computed(() => loading.value || !userStore.userInfo)
|
|
const showContent = computed(() => !loading.value && Boolean(userStore.userInfo))
|
|
</script>
|
|
|
|
<template>
|
|
<DesktopHomeShell>
|
|
<DesktopHomeTopbar @logout="$emit('logout')" />
|
|
<DesktopHomeAlerts />
|
|
|
|
<HomeSkeleton v-if="showSkeleton" />
|
|
|
|
<template v-else-if="showContent">
|
|
<section class="dhome-hero-row">
|
|
<DesktopLivePrice />
|
|
<DesktopPriceRange />
|
|
</section>
|
|
|
|
<DesktopAssetsMetrics
|
|
@open-gold-modal="ctx.openGoldModal"
|
|
@open-rial-modal="ctx.openRialModal"
|
|
/>
|
|
|
|
<section class="dhome-main-grid">
|
|
<DesktopChartSection />
|
|
<DesktopQuickActionsPanel />
|
|
</section>
|
|
</template>
|
|
</DesktopHomeShell>
|
|
</template>
|