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.
This commit is contained in:
s.esmaeili
2026-09-18 12:54:45 +03:30
parent 05fe780c89
commit 53a304b5d5
355 changed files with 22865 additions and 14 deletions
+30
View File
@@ -0,0 +1,30 @@
// Ported from legacy henza_pwa/src/Mixins/validator/index.ts — same rules,
// same messages, verbatim.
export const message = (field: string) => ` مقدار ${field} نا معتبر است `
export const mobile = (field: string) => ({
pattern: /^(\+98|0098|98|0)?9\d{9}$/g,
message: message(field),
})
export const phone = (field: string) => ({
pattern: /^((\+98|0098|98|0)\d1)?\d{8}$/g,
message: message(field),
})
export const fa = (field: string) => ({
pattern: /^([؀-ۿﮊپچگ‌ ])+$/,
message: ` مقدار ${field} باید فارسی باشد `,
})
export const mail = (field: string) => ({ type: 'email', message: message(field) })
export const url = (field: string) => ({ type: 'url', message: message(field) })
export const username = (field: string) => ({
pattern: /^(?!.*\.\.)(?!.*\.$)[^\W][\w.]{0,29}$/gim,
message: ` مقدار ${field} باید شامل حروف و اعداد انگلیسی و _ باشد `,
})
export const required = (field: string) => ({ required: true, message: ` لطفا ${field} را وارد کنید ` })
export const sheba = (field: string) => ({ pattern: /^IR\d{24}$/gim, message: message(field) })
export const card = (field: string) => ({ pattern: /^\d{16}$/gim, message: message(field) })
export const zip = (field: string) => ({ pattern: /^\d{10}$/gim, message: message(field) })
export const num = (field: string) => ({ pattern: /^\d*$/gim, message: message(field) })
export const len = (field: string, len: number) => ({ len, message: ` مقدار ${field} باید ${len} کارکتر باشد ` })
export const max = (field: string, max: number) => ({ max, message: ` مقدار ${field} باید کمتر از ${max} کارکتر باشد ` })
export const min = (field: string, min: number) => ({ min, message: ` مقدار ${field} باید بیشتر از ${min} کارکتر باشد ` })