feat: Add .env.example configuration file and integrate Redis service into Docker Compose for improved task management. Update desktop application to support document indexing and extraction workflows, enhancing user experience with a new extraction wizard and stepper components. Revise README and documentation for clarity on setup and usage.
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import { Check } from "lucide-react";
|
||||
|
||||
export type ExtractionStep = 1 | 2 | 3 | 4;
|
||||
|
||||
const STEPS: Array<{ id: ExtractionStep; label: string }> = [
|
||||
{ id: 1, label: "Carpeta" },
|
||||
{ id: 2, label: "Descubrir" },
|
||||
{ id: 3, label: "Seleccionar" },
|
||||
{ id: 4, label: "Ejecutar" },
|
||||
];
|
||||
|
||||
interface ExtractionStepperProps {
|
||||
current: ExtractionStep;
|
||||
maxReached: ExtractionStep;
|
||||
onStepClick?: (step: ExtractionStep) => void;
|
||||
}
|
||||
|
||||
export function ExtractionStepper({ current, maxReached, onStepClick }: ExtractionStepperProps) {
|
||||
return (
|
||||
<nav className="stepper" aria-label="Pasos de extraccion">
|
||||
{STEPS.map((step, index) => {
|
||||
const isDone = step.id < current;
|
||||
const isActive = step.id === current;
|
||||
const isClickable = step.id <= maxReached && !isActive;
|
||||
const state = isDone ? "done" : isActive ? "active" : step.id <= maxReached ? "available" : "todo";
|
||||
|
||||
return (
|
||||
<div className="stepper-item" key={step.id}>
|
||||
<button
|
||||
type="button"
|
||||
className={`stepper-dot ${state}`}
|
||||
disabled={!isClickable}
|
||||
onClick={() => isClickable && onStepClick?.(step.id)}
|
||||
aria-current={isActive ? "step" : undefined}
|
||||
>
|
||||
{isDone ? <Check size={14} strokeWidth={3} /> : step.id}
|
||||
</button>
|
||||
<span className={`stepper-label ${state}`}>{step.label}</span>
|
||||
{index < STEPS.length - 1 && <div className={`stepper-connector ${isDone ? "done" : ""}`} />}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user