change nademitex2

This commit is contained in:
2026-09-30 22:10:12 +03:30
parent 9cf546bf8e
commit adb0ce886f
112 changed files with 433 additions and 694 deletions
+16 -1
View File
@@ -23,6 +23,7 @@ import AuthThemeToggle from '@/components/ui/AuthThemeToggle.vue'
import PageSkeleton from '@/components/ui/PageSkeleton.vue'
import UserAvatar from '@/components/ui/UserAvatar.vue'
import HomeSuggestionsSection from '@/components/home/HomeSuggestionsSection.vue'
import { useTouchSwipe } from '@/composables/useTouchSwipe'
const router = useRouter()
const { goBack } = useGoBack('/')
@@ -145,6 +146,14 @@ function setBanner(index: number) {
startBannerRotation()
}
const { onTouchStart: onHeroTouchStart, onTouchEnd: onHeroTouchEnd } = useTouchSwipe({
enabled: () => banners.value.length > 1,
onSwipe(dir) {
moveBanner(bannerIndex.value + dir, dir)
startBannerRotation()
},
})
const displayFirst = computed(() => auth.user?.firstName || 'کاربر')
const displayLast = computed(() => auth.user?.lastName || '')
const homeLevel = computed(() => {
@@ -268,7 +277,12 @@ async function toggleFavorite(productId: string) {
<p v-if="error" class="home-error">{{ error }}</p>
<PageSkeleton v-else-if="loading" variant="home" />
<template v-else>
<section class="hero-banner" :aria-label="banner.title">
<section
class="hero-banner"
:aria-label="banner.title"
@touchstart.passive="onHeroTouchStart"
@touchend.passive="onHeroTouchEnd"
>
<TransitionGroup :name="heroAnim" tag="div" class="hero-banner__stage">
<article
:key="banner.id"
@@ -512,6 +526,7 @@ async function toggleFavorite(productId: string) {
color: #fff;
overflow: hidden;
isolation: isolate;
touch-action: pan-y;
}
.hero-banner__stage {