feat: Add status dot indicator and fix voice tracking data format
- Replace connection status chips with green/gray dot on user avatar - Fix voice command data transformation (use timestamp/data instead of startedAt/metadata) - Keep family members online indicator on left side - User avatar with status dot remains on right side 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -83,25 +83,8 @@ export const AppShell = ({ children }: AppShellProps) => {
|
|||||||
boxShadow: 1,
|
boxShadow: 1,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* Connection Status & Presence Indicator */}
|
{/* Left Side - Family Members Online Indicator */}
|
||||||
<Box
|
<Box>
|
||||||
sx={{
|
|
||||||
display: 'flex',
|
|
||||||
gap: 1,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Tooltip title={isConnected ? t('connection.syncActive') : t('connection.syncDisconnected')}>
|
|
||||||
<Chip
|
|
||||||
icon={isConnected ? <Wifi /> : <WifiOff />}
|
|
||||||
label={isConnected ? t('connection.live') : t('connection.offline')}
|
|
||||||
size="small"
|
|
||||||
color={isConnected ? 'success' : 'default'}
|
|
||||||
sx={{
|
|
||||||
fontWeight: 600,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Tooltip>
|
|
||||||
|
|
||||||
{isConnected && presence.count > 1 && (
|
{isConnected && presence.count > 1 && (
|
||||||
<Tooltip title={t('connection.familyMembersOnline', { count: presence.count })}>
|
<Tooltip title={t('connection.familyMembersOnline', { count: presence.count })}>
|
||||||
<Chip
|
<Chip
|
||||||
@@ -117,30 +100,49 @@ export const AppShell = ({ children }: AppShellProps) => {
|
|||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{/* User Menu Button - Top Right */}
|
{/* Right Side - User Menu Button with Status Indicator */}
|
||||||
<IconButton
|
<Tooltip title={isConnected ? t('connection.syncActive') : t('connection.syncDisconnected')}>
|
||||||
onClick={handleMenuOpen}
|
<IconButton
|
||||||
size="medium"
|
onClick={handleMenuOpen}
|
||||||
aria-label="user menu"
|
size="medium"
|
||||||
aria-controls={anchorEl ? 'user-menu' : undefined}
|
aria-label="user menu"
|
||||||
aria-haspopup="true"
|
aria-controls={anchorEl ? 'user-menu' : undefined}
|
||||||
aria-expanded={anchorEl ? 'true' : undefined}
|
aria-haspopup="true"
|
||||||
sx={{
|
aria-expanded={anchorEl ? 'true' : undefined}
|
||||||
minWidth: 44,
|
|
||||||
minHeight: 44,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Avatar
|
|
||||||
sx={{
|
sx={{
|
||||||
width: 36,
|
minWidth: 44,
|
||||||
height: 36,
|
minHeight: 44,
|
||||||
bgcolor: 'primary.main',
|
position: 'relative',
|
||||||
fontSize: '0.875rem',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{user?.name?.charAt(0).toUpperCase() || 'U'}
|
<Avatar
|
||||||
</Avatar>
|
sx={{
|
||||||
</IconButton>
|
width: 36,
|
||||||
|
height: 36,
|
||||||
|
bgcolor: 'primary.main',
|
||||||
|
fontSize: '0.875rem',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{user?.name?.charAt(0).toUpperCase() || 'U'}
|
||||||
|
</Avatar>
|
||||||
|
{/* Status Dot Indicator */}
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
position: 'absolute',
|
||||||
|
bottom: 2,
|
||||||
|
right: 2,
|
||||||
|
width: 12,
|
||||||
|
height: 12,
|
||||||
|
borderRadius: '50%',
|
||||||
|
bgcolor: isConnected ? '#4caf50' : '#9e9e9e',
|
||||||
|
border: '2px solid',
|
||||||
|
borderColor: 'background.paper',
|
||||||
|
boxShadow: 1,
|
||||||
|
}}
|
||||||
|
aria-label={isConnected ? 'Online' : 'Offline'}
|
||||||
|
/>
|
||||||
|
</IconButton>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
<Menu
|
<Menu
|
||||||
id="user-menu"
|
id="user-menu"
|
||||||
|
|||||||
@@ -173,12 +173,11 @@ export function VoiceFloatingButton() {
|
|||||||
const childId = children[0].id;
|
const childId = children[0].id;
|
||||||
console.log('[Voice] Using child ID:', childId);
|
console.log('[Voice] Using child ID:', childId);
|
||||||
|
|
||||||
// Create the activity - match backend CreateActivityDto format
|
// Create the activity - use frontend API format (trackingApi transforms to backend DTO)
|
||||||
const activityData = {
|
const activityData = {
|
||||||
type: activityType,
|
type: activityType,
|
||||||
startedAt: activityTimestamp ? new Date(activityTimestamp).toISOString() : new Date().toISOString(),
|
timestamp: activityTimestamp ? new Date(activityTimestamp).toISOString() : new Date().toISOString(),
|
||||||
endedAt: activityDetails.endedAt || undefined,
|
data: activityDetails,
|
||||||
metadata: activityDetails,
|
|
||||||
notes: activityDetails.notes || undefined,
|
notes: activityDetails.notes || undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user