From 5c130fc01c0eb8fce0ab9832c5e31eebf2ea3e96 Mon Sep 17 00:00:00 2001 From: Falknat Date: Thu, 15 Jan 2026 16:07:05 +0700 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B6=D0=B8=D0=BC=20=D0=A2=D0=B0?= =?UTF-8?q?=D1=81=D0=BA=D0=B0=20=D0=BD=D0=B0=20=D0=9F=D0=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit в мобильной версии зажим таска на пк :) --- front_vue/src/components/Card.vue | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/front_vue/src/components/Card.vue b/front_vue/src/components/Card.vue index b39a02d..3c94dea 100644 --- a/front_vue/src/components/Card.vue +++ b/front_vue/src/components/Card.vue @@ -7,6 +7,9 @@ @touchstart="handleTouchStart" @touchend="handleTouchEnd" @touchmove="handleTouchMove" + @mousedown="handleMouseDown" + @mouseup="handleMouseUp" + @mouseleave="handleMouseLeave" @contextmenu="handleContextMenu" :class="{ dragging: isDragging, 'has-label-color': cardLabelColor, 'long-pressing': isLongPressing }" :style="cardLabelColor ? { '--label-bg': cardLabelColor } : {}" @@ -149,6 +152,40 @@ const handleContextMenu = (e) => { } } +// Mouse long-press для ПК в мобильном режиме (когда touch события недоступны) +const handleMouseDown = (e) => { + if (!isMobile.value) return + // Только левая кнопка мыши + if (e.button !== 0) return + + longPressTimer = setTimeout(() => { + isLongPressing.value = true + // Эмитим запрос на перемещение + emit('move-request', { + cardId: props.card.id, + cardTitle: props.card.title, + columnId: props.columnId + }) + isLongPressing.value = false + }, 500) +} + +const handleMouseUp = () => { + if (longPressTimer) { + clearTimeout(longPressTimer) + longPressTimer = null + } + isLongPressing.value = false +} + +const handleMouseLeave = () => { + if (longPressTimer) { + clearTimeout(longPressTimer) + longPressTimer = null + } + isLongPressing.value = false +} + const refreshIcons = () => { if (window.lucide) { window.lucide.createIcons()