diff --git a/src/components/ProgressMonitor.tsx b/src/components/ProgressMonitor.tsx
index 5a82a40..1c9be6a 100644
--- a/src/components/ProgressMonitor.tsx
+++ b/src/components/ProgressMonitor.tsx
@@ -7,10 +7,6 @@ import {
ArrowRightIcon,
CircleStackIcon,
PlayIcon,
- CheckBadgeIcon,
- ClockIcon,
- PauseCircleIcon,
- ExclamationCircleIcon,
ChartBarIcon,
ArrowPathIcon,
} from "@heroicons/react/24/solid";
@@ -19,9 +15,11 @@ import {
canStartSewing,
canStartMaskTrace,
canResumeSewing,
- getStateVisualInfo,
} from "../utils/machineStateHelpers";
import { calculatePatternTime } from "../utils/timeCalculation";
+import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "@/components/ui/card";
+import { Button } from "@/components/ui/button";
+import { Progress } from "@/components/ui/progress";
export function ProgressMonitor() {
// Machine store
@@ -55,8 +53,6 @@ export function ProgressMonitor() {
const isMaskTraceComplete =
machineStatus === MachineStatus.MASK_TRACE_COMPLETE;
- const stateVisual = getStateVisualInfo(machineStatus);
-
// Use PEN stitch count as fallback when machine reports 0 total stitches
const totalStitches = patternInfo
? patternInfo.totalStitches === 0 && pesData?.penStitches
@@ -158,34 +154,22 @@ export function ProgressMonitor() {
return () => window.removeEventListener("resize", checkScrollable);
}, [colorBlocks]);
- const stateIndicatorColors = {
- idle: "bg-info-50 dark:bg-info-900/20 border-info-600",
- info: "bg-info-50 dark:bg-info-900/20 border-info-600",
- active: "bg-warning-50 dark:bg-warning-900/20 border-warning-500",
- waiting: "bg-warning-50 dark:bg-warning-900/20 border-warning-500",
- warning: "bg-warning-50 dark:bg-warning-900/20 border-warning-500",
- complete: "bg-success-50 dark:bg-success-900/20 border-success-600",
- success: "bg-success-50 dark:bg-success-900/20 border-success-600",
- interrupted: "bg-danger-50 dark:bg-danger-900/20 border-danger-600",
- error: "bg-danger-50 dark:bg-danger-900/20 border-danger-600",
- danger: "bg-danger-50 dark:bg-danger-900/20 border-danger-600",
- };
-
return (
-
-
-
-
-
- Sewing Progress
-
- {sewingProgress && (
-
- {progressPercent.toFixed(1)}% complete
-
- )}
+
+
+
+
+
+ Sewing Progress
+ {sewingProgress && (
+
+ {progressPercent.toFixed(1)}% complete
+
+ )}
+
-
+
+
{/* Pattern Info */}
{patternInfo && (
@@ -220,12 +204,10 @@ export function ProgressMonitor() {
{/* Progress Bar */}
{sewingProgress && (
-
+
@@ -249,49 +231,6 @@ export function ProgressMonitor() {
)}
- {/* State Visual Indicator */}
- {patternInfo &&
- (() => {
- const iconMap = {
- ready: (
-
- ),
- active: (
-
- ),
- waiting: (
-
- ),
- complete: (
-
- ),
- interrupted: (
-
- ),
- error: (
-
- ),
- };
-
- return (
-
-
- {iconMap[stateVisual.iconName]}
-
-
-
- {stateVisual.label}
-
-
- {stateVisual.description}
-
-
-
- );
- })()}
-
{/* Color Blocks */}
{colorBlocks.length > 0 && (
@@ -326,8 +265,8 @@ export function ProgressMonitor() {
isCompleted
? "border-success-600 bg-success-50 dark:bg-success-900/20"
: isCurrent
- ? "border-accent-600 bg-accent-50 dark:bg-accent-900/20 shadow-lg shadow-accent-600/20 animate-pulseGlow"
- : "border-gray-200 dark:border-gray-600 bg-gray-300 dark:bg-gray-800/50 opacity-70"
+ ? "border-gray-400 dark:border-gray-500 bg-white dark:bg-gray-700"
+ : "border-gray-200 dark:border-gray-600 bg-gray-100 dark:bg-gray-800/50 opacity-70"
}`}
role="listitem"
aria-label={`Thread ${block.colorIndex + 1}, ${block.stitchCount} stitches, ${isCompleted ? "completed" : isCurrent ? "in progress" : "pending"}`}
@@ -338,7 +277,6 @@ export function ProgressMonitor() {
className="w-7 h-7 rounded-lg border-2 border-gray-300 dark:border-gray-600 shadow-md flex-shrink-0"
style={{
backgroundColor: block.threadHex,
- ...(isCurrent && { borderColor: "#9333ea" }),
}}
title={`Thread color: ${block.threadHex}`}
aria-label={`Thread color ${block.threadHex}`}
@@ -395,7 +333,7 @@ export function ProgressMonitor() {
/>
) : isCurrent ? (
) : (
@@ -408,17 +346,11 @@ export function ProgressMonitor() {
{/* Progress bar for current block */}
{isCurrent && (
-
+
)}
);
@@ -436,36 +368,37 @@ export function ProgressMonitor() {
{/* Resume has highest priority when available */}
{canResumeSewing(machineStatus) && (
-
+
)}
{/* Start Sewing - primary action, takes more space */}
{canStartSewing(machineStatus) && !canResumeSewing(machineStatus) && (
-
+
)}
{/* Start Mask Trace - secondary action */}
{canStartMaskTrace(machineStatus) && (
-
+
)}
-
+
+
);
}