diff --git a/src/ui/components/CreateLookDialog.tsx b/src/ui/components/CreateLookDialog.tsx index 815e42f..58e238b 100644 --- a/src/ui/components/CreateLookDialog.tsx +++ b/src/ui/components/CreateLookDialog.tsx @@ -9,7 +9,14 @@ import { LoadOutfitDialog } from './LoadOutfitDialog' import { SaveOutfitDialog } from './SaveOutfitDialog' import { Badge } from './ui/badge' import { Button } from './ui/button' -import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './ui/dialog' +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from './ui/dialog' import { Label } from './ui/label' import { ScrollArea, ScrollBar } from './ui/scroll-area' import { Textarea } from './ui/textarea' @@ -29,12 +36,15 @@ interface CreateLookDialogProps { onSuccess: () => void } +type Tab = 'equipment' | 'pose' | 'expression' | 'instructions' + export const CreateLookDialog: React.FC = ({ open, onOpenChange, characterId, onSuccess, }) => { + const [activeTab, setActiveTab] = useState('equipment') const [items, setItems] = useState([]) const [loading, setLoading] = useState(true) const [selectedCategories, setSelectedCategories] = useState([]) @@ -165,288 +175,352 @@ export const CreateLookDialog: React.FC = ({ return ( <> - - -
- - Select Equipment - - Choose items to equip on your character. + + {/* Header */} + + + Create New Look + + + Design your character's look by selecting equipment, pose, and expression. + + + +
+ {/* Sidebar Navigation */} +
+ + + +
+ + {/* Content Area */} +
+ {/* Equipment Tab */} + {activeTab === 'equipment' && ( +
+ {/* Category Filter */} +
+ +
+ {EQUIPMENT_CATEGORIES.map((cat) => { + const isSelected = selectedCategories.includes(cat.main_category) + return ( + toggleCategory(cat.main_category)} + > + {cat.main_category} + + ) + })} +
+ +
+
+ + {/* Equipment Grid */} + + {loading ? ( +
+ +
+ ) : items.length === 0 ? ( +
+

No equipment found.

+
+ ) : ( +
+ {items.map((item) => { + const isSelected = selectedEquipments.some((e) => e.id === item.id) + return ( +
toggleEquipment(item)} + > +
+ {item.name} + {isSelected && ( +
+ +
+ )} +
+
+

+ {item.name} +

+

+ {item.category} +

+
+
+ ) + })} +
+ )} +
+ + {/* Selected Items (Persistent in Equipment Tab) */} +
+
+

+ Selected Items + + {selectedEquipments.length} + +

+
+ +
+ {selectedEquipments.length === 0 ? ( +
+ Select items from the list above. +
+ ) : ( + selectedEquipments.map((item) => ( +
+ {item.name} + +
+ )) + )} +
+ +
+
+
+ )} + + {/* Pose Tab */} + {activeTab === 'pose' && ( + +
+
setSelectedPoseId(null)} + > + + Default Pose +
+ {poses.map((pose) => ( +
setSelectedPoseId(pose.id)} + > + {pose.name} +
+ + {pose.name} + +
+ {selectedPoseId === pose.id && ( +
+ +
+ )} +
+ ))} +
+
+ )} + + {/* Expression Tab */} + {activeTab === 'expression' && ( + +
+
setSelectedExpressionId(null)} + > + + Default +
+ {expressions.map((expression) => ( +
setSelectedExpressionId(expression.id)} + > + {expression.name} +
+ + {expression.name} + +
+ {selectedExpressionId === expression.id && ( +
+ +
+ )} +
+ ))} +
+
+ )} + + {/* Instructions Tab */} + {activeTab === 'instructions' && ( +
+
+ +

+ Add any specific details or instructions for the AI generation. Describe how + the equipment should be worn or any specific stylistic preferences. +

+