diff --git a/maternal-web/components/layouts/AppShell/AppShell.tsx b/maternal-web/components/layouts/AppShell/AppShell.tsx index 6dbf5f0..4398616 100644 --- a/maternal-web/components/layouts/AppShell/AppShell.tsx +++ b/maternal-web/components/layouts/AppShell/AppShell.tsx @@ -62,134 +62,30 @@ export const AppShell = ({ children }: AppShellProps) => { flexDirection: 'column', minHeight: '100vh', bgcolor: 'background.default', - pb: { xs: '64px', md: 0 }, // Space for tab bar on mobile + pb: '64px', // Space for tab bar on both mobile and desktop }}> - {!isMobile && } - - {/* Mobile Header Bar */} - {isMobile && ( + {/* Header Bar - Both Mobile and Desktop */} + + {/* Connection Status & Presence Indicator */} - {/* Connection Status & Presence Indicator */} - - - : } - label={isConnected ? t('connection.live') : t('connection.offline')} - size="small" - color={isConnected ? 'success' : 'default'} - sx={{ - fontWeight: 600, - }} - /> - - - {isConnected && presence.count > 1 && ( - - } - label={presence.count} - size="small" - color="primary" - sx={{ - fontWeight: 600, - }} - /> - - )} - - - {/* User Menu Button - Top Right */} - - - {user?.name?.charAt(0).toUpperCase() || 'U'} - - - - - handleNavigate('/settings')}> - - - - {t('navigation.settings')} - - handleNavigate('/children')}> - - - - {t('navigation.children')} - - handleNavigate('/family')}> - - - - {t('navigation.family')} - - - - - - - {t('navigation.logout')} - - - - )} - - {/* Connection Status & Presence Indicator - Desktop Only */} - {!isMobile && ( - { color={isConnected ? 'success' : 'default'} sx={{ fontWeight: 600, - boxShadow: 1, }} /> @@ -216,13 +111,72 @@ export const AppShell = ({ children }: AppShellProps) => { color="primary" sx={{ fontWeight: 600, - boxShadow: 1, }} /> )} - )} + + {/* User Menu Button - Top Right */} + + + {user?.name?.charAt(0).toUpperCase() || 'U'} + + + + + handleNavigate('/settings')}> + + + + {t('navigation.settings')} + + handleNavigate('/children')}> + + + + {t('navigation.children')} + + handleNavigate('/family')}> + + + + {t('navigation.family')} + + + + + + + {t('navigation.logout')} + + + { flex: 1, px: { xs: 2, md: 3 }, py: 3, - pt: { xs: '64px', md: 3 }, // Add top padding for header bar on mobile + pt: '64px', // Add top padding for header bar on both mobile and desktop }} > {children} - {isMobile && } + ); }; diff --git a/maternal-web/components/layouts/TabBar/TabBar.tsx b/maternal-web/components/layouts/TabBar/TabBar.tsx index a898560..818846e 100644 --- a/maternal-web/components/layouts/TabBar/TabBar.tsx +++ b/maternal-web/components/layouts/TabBar/TabBar.tsx @@ -2,7 +2,7 @@ import { usePathname, useRouter } from 'next/navigation'; import { useState } from 'react'; -import { BottomNavigation, BottomNavigationAction, Paper, Fab, Box } from '@mui/material'; +import { BottomNavigation, BottomNavigationAction, Paper, Fab, Box, IconButton } from '@mui/material'; import { Home, Timeline, @@ -33,10 +33,13 @@ export const TabBar = () => { aria-label="Primary navigation" sx={{ position: 'fixed', - bottom: 0, - left: 0, - right: 0, + bottom: { xs: 0, md: 20 }, + left: { xs: 0, md: '50%' }, + right: { xs: 0, md: 'auto' }, + transform: { xs: 'none', md: 'translateX(-50%)' }, + width: { xs: '100%', md: '30%' }, zIndex: 1000, + borderRadius: { xs: 0, md: 2 }, }} elevation={3} > @@ -50,6 +53,7 @@ export const TabBar = () => { showLabels sx={{ height: 64, + borderRadius: { xs: 0, md: 2 }, '& .MuiBottomNavigationAction-root': { minWidth: 60, '&.Mui-selected': { @@ -60,7 +64,7 @@ export const TabBar = () => { > {tabs.map((tab) => { if (tab.value === 'voice') { - // Center voice button placeholder + // Center voice button return ( { alignItems: 'center', justifyContent: 'center', }} - /> + > + { + const voiceButton = document.querySelector('[aria-label="voice input"]') as HTMLButtonElement; + if (voiceButton) { + voiceButton.click(); + } + }} + sx={{ + bgcolor: '#FF69B4', + color: 'white', + width: 48, + height: 48, + '&:hover': { + bgcolor: '#FF1493', + }, + }} + > + + + ); } return ( @@ -85,7 +110,7 @@ export const TabBar = () => { - {/* Voice Command Floating Button - Centered */} + {/* Voice Command Floating Button - Mobile Only */} { } }} sx={{ + display: { xs: 'flex', md: 'none' }, position: 'fixed', bottom: 40, left: '50%', @@ -104,9 +130,9 @@ export const TabBar = () => { zIndex: 1100, width: 56, height: 56, - bgcolor: 'secondary.main', + bgcolor: '#FF69B4', '&:hover': { - bgcolor: 'secondary.dark', + bgcolor: '#FF1493', }, }} > diff --git a/maternal-web/components/voice/VoiceFloatingButton.tsx b/maternal-web/components/voice/VoiceFloatingButton.tsx index 4c7e21f..98f2575 100644 --- a/maternal-web/components/voice/VoiceFloatingButton.tsx +++ b/maternal-web/components/voice/VoiceFloatingButton.tsx @@ -323,7 +323,7 @@ export function VoiceFloatingButton() { return ( <> - {/* Floating button positioned in bottom-right - Hidden on mobile since we have TabBar center button */} + {/* Floating button positioned in bottom-right - Hidden on desktop since we have TabBar center button */}