Skip to content

Commit

Permalink
Playing with custom gantt colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Nadler committed Apr 3, 2024
1 parent 418967d commit 84d9b3e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [x] Sort the project list alphabetically
- [ ] Edit the Gantt chart directly
- [ ] Suport tauri update plugin via projectjournal.thetortoise.io
- [ ] Improve the LLM functionality for notes generation
### Known Issues
- [ ] The gantt chart may not populate on initial load, but does populate after an interaction.
### Future
Expand Down
14 changes: 10 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,23 +238,23 @@ const GanttChart: React.FC = () => {
</div>
<button
className={`${ganttSettings.showTasks ? "border-indigo-500 bg-indigo-200" : "border-indigo-500 bg-indigo-50"} rounded-md border px-1 text-xs`}
onClick={(e) =>
onClick={() =>
ganttSettings.setShowTasks(!ganttSettings.showTasks)
}
>
Tasks
</button>
<button
className={`${ganttSettings.showMilestones ? "border-indigo-500 bg-indigo-200" : "border-indigo-500 bg-indigo-50"} rounded-md border px-1 text-xs`}
onClick={(e) =>
onClick={() =>
ganttSettings.setShowMilestones(!ganttSettings.showMilestones)
}
>
Milestones
</button>
<button
className={`${ganttSettings.showEmpty ? "border-indigo-500 bg-indigo-200" : "border-indigo-500 bg-indigo-50"} rounded-md border px-1 text-xs`}
onClick={(e) => ganttSettings.setShowEmpty(!ganttSettings.showEmpty)}
className={`${ganttSettings.showEmpty ? "bg-emerald-700 border-indigo-500 bg-indigo-200" : "border-indigo-500 bg-indigo-50"} rounded-md border px-1 text-xs`}
onClick={() => ganttSettings.setShowEmpty(!ganttSettings.showEmpty)}
>
Empty
</button>
Expand All @@ -264,6 +264,12 @@ const GanttChart: React.FC = () => {
onDoubleClick={(t) =>
setActiveProject(projects.find((p) => p.id === parseInt(t.id)))
}
barBackgroundColor="#a5b4fc"
barProgressColor="#6366f1"
barBackgroundSelectedColor="#4f46e5"
projectBackgroundColor="#059669"
projectProgressColor="#10b981"
projectBackgroundSelectedColor="#047857"
viewMode={ganttSettings.chartFrequency}
todayColor="rgba(99, 102, 241, 0.1)"
TaskListHeader={({ headerHeight }) => (
Expand Down

0 comments on commit 84d9b3e

Please sign in to comment.