Files
tehran_tala/apps/user-app-v2/src/components/ui/ScrollFetchSearch.vue
T
s.esmaeili 53a304b5d5 SearchView: Removed the dynamic collection-tile grid (e.g. "پرفروش‌های این هفته") and the "نتایج / N محصول" section header from the UI. Underlying data/filtering logic untouched.
DashboardView ("میز کار"): Rebuilt from scratch with a new structure, distinct from the old card+grid layout but visually aligned with HomeView (same blurred bar, @ink/@wine palette, staged reveal animation on mount):

Single hero card (ink→wine gradient) showing balance, gold/fiat debt, and identity — no quick-action icons inside it anymore.

Live gold rate folded into a slim inline row at the bottom instead of a titled section.
Iterated shadow/spacing on the hero card per feedback (softer, less clipped).
DialogVant / DialogVantOneButton (shared modal components, used in 7+ call sites: Dashboard, Cart, SingleProduct, Register, App): Replaced Vant's default dialog chrome with the app's own rounded-card language — circular icon badge for the illustration, pill-shaped primary/secondary buttons. No call-site markup changed.

LoginView: Rebuilt from scratch — full-bleed dark hero (brand + step copy) overlapped by a floating white form sheet, animated crossfade transition between the mobile-number and OTP steps, same staged entrance animation as Home/Dashboard. All auth logic (API check, OTP stub, session login) unchanged.
2026-09-18 12:54:45 +03:30

51 lines
1.5 KiB
Vue

<!--
Ported from legacy henza_pwa/src/components/ui/ScrollFetchSearch.vue.
Legacy rendered two separate empty states, gated on an `isFav` prop, that
both used the SAME favoritEmpty image — a distinction without a difference,
preserved verbatim while this was a faithful port. The only caller that ever
passed `is-fav` was FavoritesView, which now renders its own empty state in
the redesigned language, so the prop had no remaining callers and the two
identical branches collapse to one.
-->
<template>
<main
class="flex flex-col flex-1 overflow-auto no-scrollbar w-[100vw] max-w-screen-md m-auto"
:style="{ paddingTop: padding || transition.headerHeight + 'px' }"
ref="scrollArea"
>
<slot></slot>
<Spinner cls="my-[10px]" :spinning="loading" :indicator="true" tip="درحال دریافت اطلاعات" />
<EmptyState v-if="flag" :image="favoritEmpty" />
</main>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { useInfiniteScroll } from '@vueuse/core'
import EmptyState from '../EmptyState.vue'
import Spinner from '../Spinner.vue'
import favoritEmpty from '../../assets/img/empty/favoritEmpty.svg'
import { useTransitionStore } from '../../stores/transitionStore'
withDefaults(
defineProps<{
loading: boolean
flag: boolean
padding?: string
}>(),
{},
)
const emit = defineEmits<{ (e: 'fetch'): void }>()
const transition = useTransitionStore()
const scrollArea = ref(null)
useInfiniteScroll(
scrollArea,
() => {
emit('fetch')
},
{ distance: 50 },
)
</script>