From ce2ea9dea1fcd24d70ea66345d761a739d25f9d1 Mon Sep 17 00:00:00 2001 From: Nikita Kiselev Date: Thu, 25 Dec 2025 22:02:17 +0300 Subject: [PATCH] feat: increase dock icons size and add click animation - Increase icon sizes from 1.2em to 1.5em for home, search, and cart icons - Increase catalog icon from size-6 to size-7 - Increase profile avatar and icon from w-6 h-6 to w-7 h-7 - Add dock-icon class to all icons for consistent styling - Implement bounce animation on icon click with scale effect (1.15x) - Animation duration set to 200ms for subtle feedback - Update onDockItemClick handler to trigger animation on click --- frontend/spa/src/components/Dock.vue | 46 +++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/frontend/spa/src/components/Dock.vue b/frontend/spa/src/components/Dock.vue index 6d15f03..da6f57f 100644 --- a/frontend/spa/src/components/Dock.vue +++ b/frontend/spa/src/components/Dock.vue @@ -5,7 +5,7 @@ :class="{'dock-active': route.name === 'home'}" @click="onDockItemClick" > - + @@ -24,7 +24,7 @@ @click="onDockItemClick" > + class="dock-icon size-7"> @@ -36,7 +36,7 @@ :class="{'dock-active': route.name === 'search'}" @click="onDockItemClick" > - @@ -52,7 +52,7 @@ >
{{ cart.productsCount }} - @@ -66,11 +66,11 @@ :class="{'dock-active': route.name === 'account'}" @click="onDockItemClick" > -
+
avatar
-
- +
+
@@ -91,8 +91,17 @@ const settings = useSettingsStore(); const tgData = useTgData(); const haptic = window.Telegram.WebApp.HapticFeedback; -function onDockItemClick() { +function onDockItemClick(event) { haptic.selectionChanged(); + + // Находим иконку в кликнутом элементе + const icon = event.currentTarget.querySelector('.dock-icon'); + if (icon) { + icon.classList.add('dock-icon-clicked'); + setTimeout(() => { + icon.classList.remove('dock-icon-clicked'); + }, 200); + } } @@ -116,4 +125,25 @@ function onDockItemClick() { background: var(--color-base-100); z-index: 50; } + +.dock-icon { + transition: transform 0.2s ease-out; + transform-origin: center; +} + +.dock-icon-clicked { + animation: dock-icon-bounce 0.2s ease-out; +} + +@keyframes dock-icon-bounce { + 0% { + transform: scale(1); + } + 50% { + transform: scale(1.15); + } + 100% { + transform: scale(1); + } +} \ No newline at end of file