change nademitex2
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user