From 727a84e5cac556343c9fa0eaea6d3f5db868976c Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Fri, 16 May 2025 14:46:22 +0800 Subject: [PATCH] fix: adjust visibility timer and trigger area dimensions in ChatNavigation * Reduced the button visibility timer from 1500ms to 500ms for quicker feedback. * Decreased the trigger width from 80 to 60 for improved interaction. * Updated the height calculation from 40% to 30% of the window height for better layout consistency. --- src/renderer/src/pages/home/Messages/ChatNavigation.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/pages/home/Messages/ChatNavigation.tsx b/src/renderer/src/pages/home/Messages/ChatNavigation.tsx index b0f1c834e5..24c26529ac 100644 --- a/src/renderer/src/pages/home/Messages/ChatNavigation.tsx +++ b/src/renderer/src/pages/home/Messages/ChatNavigation.tsx @@ -73,7 +73,7 @@ const ChatNavigation: FC = ({ containerId }) => { // Set a timer to hide the buttons const timer = setTimeout(() => { setIsVisible(false) - }, 1500) + }, 500) setHideTimer(timer) }, []) @@ -256,7 +256,7 @@ const ChatNavigation: FC = ({ containerId }) => { lastMoveTime.current = now // Calculate if the mouse is in the trigger area - const triggerWidth = 80 // Same as the width in styled component + const triggerWidth = 60 // Same as the width in styled component // Safe way to calculate position when using calc expressions let rightOffset = 16 // Default right offset @@ -267,7 +267,7 @@ const ChatNavigation: FC = ({ containerId }) => { const rightPosition = window.innerWidth - rightOffset - triggerWidth const topPosition = window.innerHeight * 0.3 // 30% from top - const height = window.innerHeight * 0.4 // 40% of window height + const height = window.innerHeight * 0.3 // 30% of window height const isInTriggerArea = e.clientX > rightPosition &&