refactor(ui): replace modal dialogs with toast/sheet components

Remove DialogVant/NotifyVant and add Toast and Sheet components with
useToast, useReveal, and usePageTransition composables. Rework
Navigation, RegisterView, and styles across both apps; rebuild dist assets.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
s.esmaeili
2026-10-04 13:57:25 +03:30
co-authored by Claude Sonnet 5
parent 148b99c4a6
commit c05352d6fd
205 changed files with 3362 additions and 1701 deletions
@@ -161,7 +161,7 @@ const wageLabel = computed(() => {
font-size: 10px;
font-weight: 700;
color: #fff;
background: @ink;
background: @primary;
}
.pc__flag--soft {
@@ -273,11 +273,6 @@
</Transition>
</Teleport>
<NotifyVant :timeOut="3000" v-model="notify" :color="'background-color: #14161A'">
<div class="font-bold text-right mb-2">ثبت سفارش</div>
<div>محصول با موفقیت به سبد خرید افزوده شد</div>
</NotifyVant>
<DialogVant :timeOut="-1" v-model:show="loginNotify" :closeOnClickOverlay="true">
<template v-slot:img>
<img :src="loginDialogImage" alt="" class="opacity-80" />
@@ -301,7 +296,7 @@ import { useRouter } from 'vue-router'
import Icon from '../icon/Icon.vue'
import GallerySlider from './GallerySlider.vue'
import Spinner from '../Spinner.vue'
import NotifyVant from '../NotifyVant.vue'
import { toast } from '../../composables/useToast'
import DialogVant from '../DialogVant.vue'
import { useProduct, isVariantOrderable } from '../../composables/useProduct'
import { useProductDetail } from '../../composables/useProductDetail'
@@ -327,7 +322,6 @@ const close = () => {
if (router.currentRoute.value.name === 'singleProduct') router.back()
}
const notify = ref(false)
const loginNotify = ref(false)
const imageIndex = ref(0)
const bodyOpen = ref(false)
@@ -484,7 +478,7 @@ const addToCart = () => {
// Previously the "added to cart" toast fired either way, telling the customer
// something had been added when nothing had. Kept in step with user-app-v2.
if (!cart.addToCart(storeProduct.value)) return
notify.value = true
toast.success('محصول با موفقیت به سبد خرید افزوده شد', { title: 'ثبت سفارش' })
}
const toggleFav = (e: Event) => {
@@ -732,8 +726,8 @@ onBeforeUnmount(() => {
transition: border-color 0.18s ease, background 0.18s ease;
}
.pd__variant.is-on {
background: @ink;
border-color: @ink;
background: @primary;
border-color: @primary;
}
.pd__variantImg {
width: 100%;
@@ -931,7 +925,7 @@ onBeforeUnmount(() => {
font-weight: 800;
text-decoration: none;
color: #fff;
background: @ink;
background: @primary;
transition: transform 0.18s ease, opacity 0.18s ease;
}
.pd__cta:active {
@@ -942,9 +936,9 @@ onBeforeUnmount(() => {
opacity: 0.45;
}
.pd__cta--ghost {
color: @ink;
color: @primary;
background: @canvas;
border: 1px solid @ink;
border: 1px solid @primary;
}
/* ── Full-screen preview ─────────────────────────────────── */