fix(user): register dialog, KYC modal, and home loading gaps
Repair gift-card register success modal text, enforce KYC with correct identity checks, and show skeleton/fallback while home layout loads. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import HomeSkeleton from '../components/HomeSkeleton.vue'
|
||||
import { getHomeLayoutConfig } from './registry'
|
||||
import { HOME_SECTION_COMPONENTS } from './sections'
|
||||
import type { HomeLayoutConfig, HomeSectionId } from './types'
|
||||
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
layoutConfig?: HomeLayoutConfig
|
||||
@@ -43,6 +44,11 @@ const showSkeleton = computed(() => Boolean(getToken()) && !userInfo.value)
|
||||
function resolveSectionComponent(sectionId: HomeSectionId) {
|
||||
return HOME_SECTION_COMPONENTS[sectionId]
|
||||
}
|
||||
|
||||
async function retryLoad() {
|
||||
if (!getToken()) return
|
||||
await userStore.getMyInfo()
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -77,4 +83,13 @@ function resolveSectionComponent(sectionId: HomeSectionId) {
|
||||
</div>
|
||||
|
||||
<HomeSkeleton v-else-if="showSkeleton" class="w-full" />
|
||||
|
||||
<div v-else class="home-layout-fallback flex flex-col items-center justify-center gap-3 p-6 text-center min-h-[50vh]">
|
||||
<p class="text-sm text-slate-600 leading-7">
|
||||
در حال آمادهسازی صفحه اصلی هستیم. اگر چیزی نمایش داده نمیشود، یکبار تلاش مجدد کنید.
|
||||
</p>
|
||||
<BasicButton type="primary" class="!rounded-xl" @click="retryLoad">
|
||||
تلاش مجدد
|
||||
</BasicButton>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { defineAsyncComponent, type Component } from 'vue'
|
||||
import type { HomeLayoutConfig, HomeLayoutId } from './types'
|
||||
import { boursecuHomeLayoutConfig } from './configs/boursecu'
|
||||
import HomeSkeleton from '../components/HomeSkeleton.vue'
|
||||
|
||||
export const DEFAULT_HOME_LAYOUT_ID: HomeLayoutId = 'boursecu'
|
||||
|
||||
@@ -12,7 +13,11 @@ let cachedLayoutRenderer: Component | null = null
|
||||
|
||||
function getLayoutRenderer(): Component {
|
||||
if (!cachedLayoutRenderer) {
|
||||
cachedLayoutRenderer = defineAsyncComponent(() => import('./HomeLayoutRenderer.vue'))
|
||||
cachedLayoutRenderer = defineAsyncComponent({
|
||||
loader: () => import('./HomeLayoutRenderer.vue'),
|
||||
loadingComponent: HomeSkeleton,
|
||||
delay: 0,
|
||||
})
|
||||
}
|
||||
|
||||
return cachedLayoutRenderer
|
||||
|
||||
Reference in New Issue
Block a user