diff --git a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_components/TodayTodoCard.tsx b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_components/TodayTodoCard.tsx index 920d018f..f222083d 100644 --- a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_components/TodayTodoCard.tsx +++ b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_components/TodayTodoCard.tsx @@ -1,12 +1,21 @@ import { + CalendarDisableIcon, + CalendarOnIcon, + ClockDisableIcon, + ClockOnIcon, + MemoDisableIcon, + MemoOnIcon, PlayDisabledIcon, PlayIcon, + RepeatDisableIcon, + RepeatOnIcon, StopIcon, } from "@repo/timo-design-system/icons"; import { Checkbox, PlayButton, - TodoToolbar, + PriorityIcon, + TagIcon, type PriorityLevel, } from "@repo/timo-design-system/ui"; import { cn } from "@repo/timo-design-system/utils"; @@ -19,14 +28,18 @@ const CARD_STYLE = { card: "bg-white", title: "text-timo-gray-900", subText: "text-timo-gray-700", + toolbarText: "text-timo-gray-900", }, done: { card: "bg-timo-gray-200", title: "text-timo-gray-700", subText: "text-timo-gray-700", + toolbarText: "text-timo-gray-700", }, } as const; +const TOOLBAR_ICON_CLASS_NAME = "size-4.5 shrink-0 md:size-5.5"; + export interface SubTodo { id: number; text: string; @@ -35,7 +48,6 @@ export interface SubTodo { export interface TodayTodoCardToolbar { date: string; - dateValue: Date; time: string; priority?: PriorityLevel; tag?: string; @@ -80,8 +92,13 @@ export const TodayTodoCard = ({ onMouseLeave, }: TodayTodoCardProps) => { const t = useTranslations("Home.createModal"); + const tCommon = useTranslations("Common"); const style = CARD_STYLE[isDimmed ? "done" : "active"]; + const priorityLabel = toolbar.priority + ? tCommon(`priority.${toolbar.priority}`) + : undefined; + const handleCardKeyDown = (e: KeyboardEvent) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); @@ -98,7 +115,7 @@ export const TodayTodoCard = ({ onClick={onCardClick} onKeyDown={onCardClick ? handleCardKeyDown : undefined} className={cn( - "border-timo-gray-500 flex min-w-80 flex-col gap-1 rounded-[4px] border px-5 py-4", + "border-timo-gray-500 flex w-full flex-col gap-1 overflow-hidden rounded-[4px] border px-3.5 py-3 md:min-w-80 md:px-5 md:py-4", style.card, onCardClick && "cursor-pointer", )} @@ -173,33 +190,73 @@ export const TodayTodoCard = ({ )} -
-
- +
+
+ + {isDimmed ? ( + + ) : ( + + )} + + {toolbar.date} + + + + {isDimmed ? : } + + {toolbar.time} + + + + + + + + + + {isDimmed || !toolbar.hasMemo ? ( + + ) : ( + + )} + + + {isDimmed || !toolbar.hasRepeat ? ( + + ) : ( + + )} +
+ + {toolbar.time} +
); diff --git a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_containers/TodayTodoListContainer.tsx b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_containers/TodayTodoListContainer.tsx index 94a4a295..7d544a7e 100644 --- a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_containers/TodayTodoListContainer.tsx +++ b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/_containers/TodayTodoListContainer.tsx @@ -139,7 +139,6 @@ export const TodayTodoListContainer = () => { date: formatShortDateLabel( parseDateKey(todo.date) ?? new Date(), ), - dateValue: parseDateKey(todo.date) ?? new Date(), time: convertDurationToTimeText(durationSeconds), priority: todo.priority, tag: todo.tag ? getTagLabel(todo.tag) : undefined, diff --git a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/page.tsx b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/page.tsx index 4fffe122..1b06d043 100644 --- a/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/page.tsx +++ b/apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/today/page.tsx @@ -6,8 +6,8 @@ export default function TodayPage() { return (
-
-
+
+
diff --git a/apps/timo-web/components/calendar/TodayCalendarEventCard.tsx b/apps/timo-web/components/calendar/TodayCalendarEventCard.tsx index 5a5d1573..c0662370 100644 --- a/apps/timo-web/components/calendar/TodayCalendarEventCard.tsx +++ b/apps/timo-web/components/calendar/TodayCalendarEventCard.tsx @@ -9,7 +9,7 @@ interface TodayCalendarEventCardProps { export const TodayCalendarEventCard = ({ title, }: TodayCalendarEventCardProps) => ( -
+