getStatusColor returns the appropriate color style for a task status.
(status string, r *lipgloss.Renderer)
| 46 | |
| 47 | // getStatusColor returns the appropriate color style for a task status. |
| 48 | func getStatusColor(status string, r *lipgloss.Renderer) lipgloss.Style { |
| 49 | switch strings.ToLower(status) { |
| 50 | case "completed": |
| 51 | return r.NewStyle().Foreground(lipgloss.Color("2")) // Green |
| 52 | case "in-progress": |
| 53 | return r.NewStyle().Foreground(lipgloss.Color("3")) // Yellow |
| 54 | case "in-review": |
| 55 | return r.NewStyle().Foreground(lipgloss.Color("5")) // Magenta |
| 56 | case "blocked": |
| 57 | return r.NewStyle().Foreground(lipgloss.Color("1")) // Red |
| 58 | default: // pending or other |
| 59 | return r.NewStyle().Foreground(lipgloss.Color("8")) // Gray |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | // getPriorityColor returns the appropriate color style for a priority level. |
| 64 | func getPriorityColor(priority string, r *lipgloss.Renderer) lipgloss.Style { |
no outgoing calls
no test coverage detected