feat(mobile): improve GlobalChatPane behavior on mobile screens

- Hide FloatingChatButton on mobile for all pages except home (/ and /giftcard)
- Add Building/Chatting toggle on mobile Chat tab in ProjectView
- Add embedded mode to GlobalChatPane for inline rendering without fixed positioning
- Add translations for "building" and "chatting" in all locales (en, pt, zh, ha, yo, ig)
This commit is contained in:
MK Fain committed 2025-12-03 21:57:41 -06:00
1 parent 075495fe7c
commit 395a7a76bb
9 files changed
+211 -31

No files matched your search

+8
View File
@@ -4,12 +4,14 @@ import { MessageCircle, X } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { useGlobalChat } from '@/hooks/useGlobalChat';
import { useAppContext } from '@/hooks/useAppContext';
import { useIsMobile } from '@/hooks/useIsMobile';
import { cn } from '@/lib/utils';
export function FloatingChatButton() {
const { isOpen, setIsOpen, hasUnread } = useGlobalChat();
const { config } = useAppContext();
const location = useLocation();
const isMobile = useIsMobile();
const [isHovered, setIsHovered] = useState(false);
const [isHiddenTemporarily, setIsHiddenTemporarily] = useState(false);
@@ -28,6 +30,12 @@ export function FloatingChatButton() {
return null;
}
// On mobile, only show on home screen (/ or /giftcard)
const isHomePage = location.pathname === '/' || location.pathname === '/giftcard';
if (isMobile && !isHomePage) {
return null;
}
// Don't render if temporarily hidden
if (isHiddenTemporarily) {
return null;