From 5e254c8c03879d933b799471dfc9c3cd16030d58 Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Wed, 8 Apr 2026 00:16:06 -0400 Subject: [PATCH] Update mobile UI styling for TTS button and prompt input --- .../components/message/FloatingTTSButton.tsx | 10 ++---- .../src/components/message/PromptInput.tsx | 31 ++++++++++++------- frontend/src/pages/SessionDetail.tsx | 4 +-- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/frontend/src/components/message/FloatingTTSButton.tsx b/frontend/src/components/message/FloatingTTSButton.tsx index 394f98ef..bba58661 100644 --- a/frontend/src/components/message/FloatingTTSButton.tsx +++ b/frontend/src/components/message/FloatingTTSButton.tsx @@ -1,6 +1,5 @@ import { Volume2, VolumeX, Loader2 } from 'lucide-react' import { useTTS } from '@/hooks/useTTS' -import { useMobile } from '@/hooks/useMobile' interface FloatingTTSButtonProps { content: string @@ -8,7 +7,6 @@ interface FloatingTTSButtonProps { export function FloatingTTSButton({ content }: FloatingTTSButtonProps) { const { speak, stop, isEnabled, isPlaying, isLoading, originalText } = useTTS() - const isMobile = useMobile() if (!isEnabled || !content.trim()) { return null @@ -24,15 +22,13 @@ export function FloatingTTSButton({ content }: FloatingTTSButtonProps) { } } - const buttonPosition = isMobile ? 'bottom-24' : 'bottom-20' - return ( + {isMobile && showScrollButton ? ( + + ) : !isMobile ? ( + + ) : null} {showStopButton && ( - ) : ( + )} - )} diff --git a/frontend/src/pages/SessionDetail.tsx b/frontend/src/pages/SessionDetail.tsx index 7bd5198d..89874fbe 100644 --- a/frontend/src/pages/SessionDetail.tsx +++ b/frontend/src/pages/SessionDetail.tsx @@ -538,10 +538,10 @@ export function SessionDetail() { handleClearPrompt() }} onClick={handleClearPrompt} - className="absolute -top-12 right-0 md:right-4 z-50 flex items-center gap-2 px-4 py-2 rounded-xl bg-gradient-to-br from-red-600 to-red-700 hover:from-red-500 hover:to-red-600 text-destructive-foreground border-2 border-red-500/60 hover:border-red-400 shadow-lg shadow-red-500/30 hover:shadow-red-500/50 backdrop-blur-md transition-all duration-200 active:scale-95 hover:scale-105 ring-2 ring-red-500/20 hover:ring-red-500/40" + className="absolute -top-5 right-0 md:right-4 z-50 flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-gradient-to-br from-red-600 to-red-700 hover:from-red-500 hover:to-red-600 text-destructive-foreground border border-red-500/60 hover:border-red-400 shadow-md shadow-red-500/30 hover:shadow-red-500/50 backdrop-blur-md transition-all duration-200 active:scale-95 hover:scale-105 ring-1 ring-red-500/20 hover:ring-red-500/40" aria-label="Clear" > - + Clear )}