From d3c8d377f8c56b5de0538da2367232369540c0c3 Mon Sep 17 00:00:00 2001 From: Eric Gullickson <16152721+ericgullickson@users.noreply.github.com> Date: Fri, 2 Jan 2026 21:57:53 -0600 Subject: [PATCH] fix: replace emojis with MUI icons and use theme colors in dashboard (refs #2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Visual consistency fixes: - Replace all emojis with MUI Rounded icons - Use theme colors (primary.main, warning.main, success.main, error.main) - Use MUI Box with sx prop for consistent styling - Use shared Button component instead of custom styled buttons - Use theme tokens for dark mode (avus, titanio, canna) Components updated: - SummaryCards: DirectionsCarRoundedIcon, BuildRoundedIcon, LocalGasStationRoundedIcon - QuickActions: MUI icons with primary.main color - VehicleAttention: ErrorRoundedIcon, WarningAmberRoundedIcon, ScheduleRoundedIcon - DashboardScreen: Proper icons for error/empty states, shared Button component 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../dashboard/components/DashboardScreen.tsx | 38 +++--- .../dashboard/components/QuickActions.tsx | 115 ++++++++++++------ .../dashboard/components/SummaryCards.tsx | 83 ++++++++----- .../dashboard/components/VehicleAttention.tsx | 102 ++++++++++------ 4 files changed, 220 insertions(+), 118 deletions(-) diff --git a/frontend/src/features/dashboard/components/DashboardScreen.tsx b/frontend/src/features/dashboard/components/DashboardScreen.tsx index efb0760..77e96ea 100644 --- a/frontend/src/features/dashboard/components/DashboardScreen.tsx +++ b/frontend/src/features/dashboard/components/DashboardScreen.tsx @@ -3,11 +3,15 @@ */ import React from 'react'; +import { Box } from '@mui/material'; +import WarningAmberRoundedIcon from '@mui/icons-material/WarningAmberRounded'; +import DirectionsCarRoundedIcon from '@mui/icons-material/DirectionsCarRounded'; import { SummaryCards, SummaryCardsSkeleton } from './SummaryCards'; import { VehicleAttention, VehicleAttentionSkeleton } from './VehicleAttention'; import { QuickActions, QuickActionsSkeleton } from './QuickActions'; import { useDashboardSummary, useVehiclesNeedingAttention } from '../hooks/useDashboardData'; import { GlassCard } from '../../../shared-minimal/components/mobile/GlassCard'; +import { Button } from '../../../shared-minimal/components/Button'; import { MobileScreen } from '../../../core/store'; import { Vehicle } from '../../vehicles/types/vehicles.types'; @@ -30,20 +34,22 @@ export const DashboardScreen: React.FC = ({
-
⚠️
-

+ + + +

Unable to Load Dashboard

-

+

There was an error loading your dashboard data

- +
@@ -67,20 +73,22 @@ export const DashboardScreen: React.FC = ({
-
🚗
-

+ + + +

Welcome to MotoVaultPro

-

+

Get started by adding your first vehicle to track fuel logs, maintenance, and more

- +
@@ -116,7 +124,7 @@ export const DashboardScreen: React.FC = ({ {/* Footer Hint */}
-

+

Dashboard updates every 2 minutes

diff --git a/frontend/src/features/dashboard/components/QuickActions.tsx b/frontend/src/features/dashboard/components/QuickActions.tsx index e8c7370..e9afc96 100644 --- a/frontend/src/features/dashboard/components/QuickActions.tsx +++ b/frontend/src/features/dashboard/components/QuickActions.tsx @@ -3,15 +3,18 @@ */ import React from 'react'; +import { Box, SvgIconProps } from '@mui/material'; +import DirectionsCarRoundedIcon from '@mui/icons-material/DirectionsCarRounded'; +import LocalGasStationRoundedIcon from '@mui/icons-material/LocalGasStationRounded'; +import BuildRoundedIcon from '@mui/icons-material/BuildRounded'; +import FormatListBulletedRoundedIcon from '@mui/icons-material/FormatListBulletedRounded'; import { GlassCard } from '../../../shared-minimal/components/mobile/GlassCard'; interface QuickAction { id: string; title: string; description: string; - icon: string; - color: string; - bgColor: string; + icon: React.ComponentType; onClick: () => void; } @@ -33,36 +36,28 @@ export const QuickActions: React.FC = ({ id: 'add-vehicle', title: 'Add Vehicle', description: 'Register a new vehicle', - icon: '🚗', - color: 'text-blue-600', - bgColor: 'bg-blue-50', + icon: DirectionsCarRoundedIcon, onClick: onAddVehicle, }, { id: 'log-fuel', title: 'Log Fuel', description: 'Record a fuel purchase', - icon: '⛽', - color: 'text-green-600', - bgColor: 'bg-green-50', + icon: LocalGasStationRoundedIcon, onClick: onLogFuel, }, { id: 'view-maintenance', title: 'Maintenance', description: 'View maintenance records', - icon: '🔧', - color: 'text-orange-600', - bgColor: 'bg-orange-50', + icon: BuildRoundedIcon, onClick: onViewMaintenance, }, { id: 'view-vehicles', title: 'My Vehicles', description: 'View all vehicles', - icon: '📋', - color: 'text-purple-600', - bgColor: 'bg-purple-50', + icon: FormatListBulletedRoundedIcon, onClick: onViewVehicles, }, ]; @@ -70,33 +65,79 @@ export const QuickActions: React.FC = ({ return (
-

+

Quick Actions

-

+

Common tasks and navigation

- {actions.map((action) => ( - - ))} + {actions.map((action) => { + const IconComponent = action.icon; + return ( + + + + + + + {action.title} + + + {action.description} + + + + ); + })}
); @@ -113,9 +154,9 @@ export const QuickActionsSkeleton: React.FC = () => { {[1, 2, 3, 4].map((i) => (
-
+
diff --git a/frontend/src/features/dashboard/components/SummaryCards.tsx b/frontend/src/features/dashboard/components/SummaryCards.tsx index 3e8d6ec..47bcc76 100644 --- a/frontend/src/features/dashboard/components/SummaryCards.tsx +++ b/frontend/src/features/dashboard/components/SummaryCards.tsx @@ -3,6 +3,10 @@ */ import React from 'react'; +import { Box } from '@mui/material'; +import DirectionsCarRoundedIcon from '@mui/icons-material/DirectionsCarRounded'; +import BuildRoundedIcon from '@mui/icons-material/BuildRounded'; +import LocalGasStationRoundedIcon from '@mui/icons-material/LocalGasStationRounded'; import { GlassCard } from '../../../shared-minimal/components/mobile/GlassCard'; import { DashboardSummary } from '../types'; @@ -15,52 +19,71 @@ export const SummaryCards: React.FC = ({ summary }) => { { title: 'Total Vehicles', value: summary.totalVehicles, - icon: '🚗', - color: 'text-blue-600', - bgColor: 'bg-blue-50', + icon: DirectionsCarRoundedIcon, + color: 'primary.main', }, { title: 'Upcoming Maintenance', value: summary.upcomingMaintenanceCount, subtitle: 'Next 30 days', - icon: '🔧', - color: 'text-orange-600', - bgColor: 'bg-orange-50', + icon: BuildRoundedIcon, + color: 'warning.main', }, { title: 'Recent Fuel Logs', value: summary.recentFuelLogsCount, subtitle: 'Last 7 days', - icon: '⛽', - color: 'text-green-600', - bgColor: 'bg-green-50', + icon: LocalGasStationRoundedIcon, + color: 'success.main', }, ]; return (
- {cards.map((card) => ( - -
-
- {card.icon} -
-
-

- {card.title} -

-

- {card.value} -

- {card.subtitle && ( -

- {card.subtitle} + {cards.map((card) => { + const IconComponent = card.icon; + return ( + +

+ + + +
+

+ {card.title}

- )} + + {card.value} + + {card.subtitle && ( +

+ {card.subtitle} +

+ )} +
-
- - ))} + + ); + })}
); }; @@ -71,7 +94,7 @@ export const SummaryCardsSkeleton: React.FC = () => { {[1, 2, 3].map((i) => (
-
+
diff --git a/frontend/src/features/dashboard/components/VehicleAttention.tsx b/frontend/src/features/dashboard/components/VehicleAttention.tsx index 291d748..2ee6b67 100644 --- a/frontend/src/features/dashboard/components/VehicleAttention.tsx +++ b/frontend/src/features/dashboard/components/VehicleAttention.tsx @@ -3,6 +3,11 @@ */ import React from 'react'; +import { Box, SvgIconProps } from '@mui/material'; +import CheckCircleRoundedIcon from '@mui/icons-material/CheckCircleRounded'; +import ErrorRoundedIcon from '@mui/icons-material/ErrorRounded'; +import WarningAmberRoundedIcon from '@mui/icons-material/WarningAmberRounded'; +import ScheduleRoundedIcon from '@mui/icons-material/ScheduleRounded'; import { GlassCard } from '../../../shared-minimal/components/mobile/GlassCard'; import { VehicleNeedingAttention } from '../types'; @@ -16,11 +21,13 @@ export const VehicleAttention: React.FC = ({ vehicles, on return (
-
-

+ + + +

All Caught Up!

-

+

No vehicles need immediate attention

@@ -28,34 +35,28 @@ export const VehicleAttention: React.FC = ({ vehicles, on ); } - const priorityConfig = { + const priorityConfig: Record }> = { high: { - color: 'text-red-600', - bgColor: 'bg-red-50', - borderColor: 'border-red-200', - icon: '🚨', + color: 'error.main', + icon: ErrorRoundedIcon, }, medium: { - color: 'text-orange-600', - bgColor: 'bg-orange-50', - borderColor: 'border-orange-200', - icon: '⚠️', + color: 'warning.main', + icon: WarningAmberRoundedIcon, }, low: { - color: 'text-yellow-600', - bgColor: 'bg-yellow-50', - borderColor: 'border-yellow-200', - icon: '⏰', + color: 'info.main', + icon: ScheduleRoundedIcon, }, }; return (
-

+

Needs Attention

-

+

Vehicles with overdue maintenance

@@ -63,41 +64,70 @@ export const VehicleAttention: React.FC = ({ vehicles, on
{vehicles.map((vehicle) => { const config = priorityConfig[vehicle.priority]; + const IconComponent = config.icon; return ( -
onVehicleClick?.(vehicle.id)} role={onVehicleClick ? 'button' : undefined} tabIndex={onVehicleClick ? 0 : undefined} - onKeyDown={(e) => { + onKeyDown={(e: React.KeyboardEvent) => { if (onVehicleClick && (e.key === 'Enter' || e.key === ' ')) { e.preventDefault(); onVehicleClick(vehicle.id); } }} + sx={{ + p: 2, + borderRadius: 3, + bgcolor: 'action.hover', + border: '1px solid', + borderColor: 'divider', + cursor: onVehicleClick ? 'pointer' : 'default', + transition: 'all 0.2s', + '&:hover': onVehicleClick ? { + bgcolor: 'action.selected', + } : {}, + }} >
-
- {config.icon} -
+ + +
-

+ {vehicle.nickname || `${vehicle.year} ${vehicle.make} ${vehicle.model}`} -

-

+ +

{vehicle.reason}

-
- - {vehicle.priority.toUpperCase()} PRIORITY - -
+ + {vehicle.priority.toUpperCase()} PRIORITY +
-
+ ); })}
@@ -114,7 +144,7 @@ export const VehicleAttentionSkeleton: React.FC = () => {
{[1, 2].map((i) => ( -
+