generated from nhcarrigan/template
5ad9b50dc8
Completes time tracking implementation across all media types by applying the same pattern established in Games component. Changes Applied to Books, Music, Shows, and Manga: UI Components: - Added time tracking state properties (hours/minutes for new and edit) - Integrated hour/minute input fields in Add forms (after rating) - Integrated hour/minute input fields in Edit forms (after edit-rating) - Added time spent display on media cards with appropriate emojis: * Books: 📖 Reading Time * Music: 🎵 Listening Time * Shows: 📺 Watch Time * Manga: 📚 Reading Time Form Management: - Updated resetForm() to clear time tracking fields - Added updateNew[Type]TimeSpent() conversion methods - Added updateEdit[Type]TimeSpent() conversion methods - Updated startEdit() to populate time fields from stored data Helper Methods: - Added formatTimeSpent() to format minutes as "Xh Ym", "Xh", or "Ym" - Converts hours/minutes to total minutes for storage - Splits total minutes back to hours/minutes for editing Styling: - Added .form-row CSS for side-by-side hour/minute inputs - Added .time-spent CSS with coloured display: * Books: Green (#10b981) * Music: Purple (#8b5cf6) * Shows: Purple (#8b5cf6) * Manga: Green (#10b981) All implementations follow the exact same pattern for consistency and maintainability across the application.