diff --git a/package.json b/package.json index 0ce0d97..00a84a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.58.3", + "version": "1.59.0", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "main": "index.js", "scripts": { diff --git a/src/components/WeeklyView.tsx b/src/components/WeeklyView.tsx index 12da5fb..4c093e1 100644 --- a/src/components/WeeklyView.tsx +++ b/src/components/WeeklyView.tsx @@ -1983,6 +1983,7 @@ export default function WeeklyView() { weatherEnabled?: boolean; weatherDisplay?: WeatherDisplayKey[]; showTaskCheckboxes?: boolean; + showProjectIcons?: boolean; showSomeday?: boolean; showAllDayEvents?: boolean; allDayPosition?: "above" | "below"; @@ -1991,7 +1992,7 @@ export default function WeeklyView() { startHour?: number; endHour?: number; }; - const PER_VIEW_KEYS = ["hourLabelFormat", "showSubHourSlots", "weatherEnabled", "weatherDisplay", "showTaskCheckboxes", "showSomeday", "showAllDayEvents", "allDayPosition", "showCompletedTasks", "cellDuration", "startHour", "endHour"] as const; + const PER_VIEW_KEYS = ["hourLabelFormat", "showSubHourSlots", "weatherEnabled", "weatherDisplay", "showTaskCheckboxes", "showProjectIcons", "showSomeday", "showAllDayEvents", "allDayPosition", "showCompletedTasks", "cellDuration", "startHour", "endHour"] as const; const [viewSettings, setViewSettings] = useState>({}); const viewSettingsRef = useRef>({}); viewSettingsRef.current = viewSettings; @@ -2062,6 +2063,7 @@ export default function WeeklyView() { const effectiveWeatherEnabled = getEffective("weatherEnabled", profile.weatherEnabled); const effectiveWeatherDisplay = (getEffective("weatherDisplay", WEATHER_DISPLAY_DEFAULTS) || WEATHER_DISPLAY_DEFAULTS) as WeatherDisplayKey[]; const effectiveShowTaskCheckboxes = getEffective("showTaskCheckboxes", profile.showTaskCheckboxes); + const effectiveShowProjectIcons = getEffective("showProjectIcons", profile.showProjectIcons); const effectiveShowSomeday = getEffective("showSomeday", showSomeday); const effectiveShowAllDay = getEffective("showAllDayEvents", showAllDay); const effectiveAllDayPosition = getEffective("allDayPosition", allDayPosition) || "above"; @@ -5859,6 +5861,12 @@ export default function WeeklyView() { {profile.showTaskCheckboxes ? : } +
+ {language === "de" ? "Projekt-Icons" : "Project Icons"} + +
{/* Start on */}
@@ -7613,6 +7621,7 @@ export default function WeeklyView() { editingTaskId={editingTaskId} onSetEditingTaskId={setEditingTaskId} showTaskCheckboxes={effectiveShowTaskCheckboxes} + showProjectIcons={effectiveShowProjectIcons} projects={projects} onProjectAssign={assignProject} kanbanStages={kanbanStages} @@ -8312,6 +8321,7 @@ export default function WeeklyView() { editingTaskId={editingTaskId} onSetEditingTaskId={setEditingTaskId} showTaskCheckboxes={effectiveShowTaskCheckboxes} + showProjectIcons={effectiveShowProjectIcons} projects={projects} onProjectAssign={assignProject} kanbanStages={kanbanStages} @@ -8383,6 +8393,7 @@ export default function WeeklyView() { editingTaskId={editingTaskId} onSetEditingTaskId={setEditingTaskId} showTaskCheckboxes={effectiveShowTaskCheckboxes} + showProjectIcons={effectiveShowProjectIcons} projects={projects} onProjectAssign={assignProject} kanbanStages={kanbanStages} @@ -9450,6 +9461,7 @@ interface TaskItemProps { onSetEditingTaskId?: (id: string | null) => void; isSubTask?: boolean; showTaskCheckboxes?: boolean; + showProjectIcons?: boolean; projects?: { id: string; name: string; icon?: string | null; color?: string | null }[]; onProjectAssign?: (taskId: string, projectId: string | null) => void; kanbanStages?: KanbanStage[]; @@ -9477,6 +9489,7 @@ function TaskItem({ onSetEditingTaskId, isSubTask = false, showTaskCheckboxes = false, + showProjectIcons = false, projects = [], onProjectAssign, kanbanStages = [], @@ -9756,6 +9769,11 @@ function TaskItem({ }} /> )} + {showProjectIcons && task.project && ( + + + + )}