diff --git a/run.sh b/run.sh index dedae77..9f10cfb 100755 --- a/run.sh +++ b/run.sh @@ -12,6 +12,7 @@ docker run -it --rm \ -v ~/projects/faculty/4850_AdvancedFE/2024-fall-alex/modules:/app/storage/advanced_frontend \ -v ~/projects/faculty/1810/2025-spring-alex/online:/app/storage/intro_to_web_online \ -v ~/projects/faculty/1400/2025_spring_alex/modules:/app/storage/1400 \ + -v ~/projects/faculty/3840_Telemetry/2025_spring_alex/modules:/app/storage/telemetry \ node \ sh -c " mkdir -p ~/.npm-global && \ diff --git a/src/app/course/[courseName]/calendar/day/DayTitle.tsx b/src/app/course/[courseName]/calendar/day/DayTitle.tsx index 792f93b..e973082 100644 --- a/src/app/course/[courseName]/calendar/day/DayTitle.tsx +++ b/src/app/course/[courseName]/calendar/day/DayTitle.tsx @@ -7,6 +7,9 @@ import { DraggableItem } from "../../context/drag/draggingContext"; import { useDragStyleContext } from "../../context/drag/dragStyleContext"; import { getLectureForDay } from "@/models/local/utils/lectureUtils"; import { useLecturesSuspenseQuery } from "@/hooks/localCourse/lectureHooks"; +import ClientOnly from "@/components/ClientOnly"; +import { Tooltip } from "@/components/Tooltip"; +import { useRef, useState } from "react"; export function DayTitle({ day, dayAsDate }: { day: string; dayAsDate: Date }) { const { courseName } = useCourseContext(); @@ -14,6 +17,8 @@ export function DayTitle({ day, dayAsDate }: { day: string; dayAsDate: Date }) { const { setIsDragging } = useDragStyleContext(); const todaysLecture = getLectureForDay(weeks, dayAsDate); const modal = useModal(); + const linkRef = useRef(null); + const [tooltipVisible, setTooltipVisible] = useState(false); const lectureName = todaysLecture && (todaysLecture.name || "lecture"); @@ -38,9 +43,21 @@ export function DayTitle({ day, dayAsDate }: { day: string; dayAsDate: Date }) { setIsDragging(true); } }} + ref={linkRef} + onMouseEnter={() => setTooltipVisible(true)} + onMouseLeave={() => setTooltipVisible(false)} > {dayAsDate.getDate()} {lectureName} + + {(lectureName?.length ?? 0) > 0 && ( + + )} + - ; visible: boolean; @@ -16,10 +16,10 @@ export const DayItemTooltip: React.FC<{ }} className={ " absolute -translate-x-1/2 " + - " bg-gray-800 text-white text-sm " + - " rounded py-1 px-2 " + + " bg-gray-900 text-slate-200 text-sm " + + " rounded-md py-1 px-2 " + " transition-all duration-400 " + - " border border-slate-700 shadow-[0_0px_10px_0px] shadow-slate-500/50 " + + " border border-slate-700 shadow-[0px_0px_10px_5px] shadow-slate-500/20 " + (visible ? " " : " hidden -z-50 ") } role="tooltip"