mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
maybe styling
This commit is contained in:
@@ -12,7 +12,6 @@ import { getLectureUrl } from "@/services/urlUtils";
|
|||||||
import DropTargetStyling from "../../../../../components/DropTargetStyling";
|
import DropTargetStyling from "../../../../../components/DropTargetStyling";
|
||||||
import { ItemInDay } from "./ItemInDay";
|
import { ItemInDay } from "./ItemInDay";
|
||||||
import { useTodaysItems } from "./useTodaysItems";
|
import { useTodaysItems } from "./useTodaysItems";
|
||||||
import { useState } from "react";
|
|
||||||
import Modal from "@/components/Modal";
|
import Modal from "@/components/Modal";
|
||||||
import NewItemForm from "../../modules/NewItemForm";
|
import NewItemForm from "../../modules/NewItemForm";
|
||||||
|
|
||||||
@@ -27,14 +26,9 @@ export default function Day({ day, month }: { day: string; month: number }) {
|
|||||||
|
|
||||||
const { data: settings } = useLocalCourseSettingsQuery();
|
const { data: settings } = useLocalCourseSettingsQuery();
|
||||||
const { itemDropOnDay } = useDraggingContext();
|
const { itemDropOnDay } = useDraggingContext();
|
||||||
const [contextCoordinates, setContextCoordinates] = useState<
|
|
||||||
{ x: number; y: number } | undefined
|
|
||||||
>();
|
|
||||||
|
|
||||||
const { todaysAssignments, todaysQuizzes, todaysPages } = useTodaysItems(day);
|
const { todaysAssignments, todaysQuizzes, todaysPages } = useTodaysItems(day);
|
||||||
|
|
||||||
const isInSameMonth = dayAsDate.getMonth() + 1 == month;
|
const isInSameMonth = dayAsDate.getMonth() + 1 == month;
|
||||||
|
|
||||||
const classOnThisDay = settings.daysOfWeek.includes(getDayOfWeek(dayAsDate));
|
const classOnThisDay = settings.daysOfWeek.includes(getDayOfWeek(dayAsDate));
|
||||||
|
|
||||||
const meetingClasses = classOnThisDay ? " bg-slate-900 " : " ";
|
const meetingClasses = classOnThisDay ? " bg-slate-900 " : " ";
|
||||||
@@ -49,18 +43,8 @@ export default function Day({ day, month }: { day: string; month: number }) {
|
|||||||
className={" rounded-lg m-1 min-h-10 " + meetingClasses + monthClass}
|
className={" rounded-lg m-1 min-h-10 " + meetingClasses + monthClass}
|
||||||
onDrop={(e) => itemDropOnDay(e, day)}
|
onDrop={(e) => itemDropOnDay(e, day)}
|
||||||
onDragOver={(e) => e.preventDefault()}
|
onDragOver={(e) => e.preventDefault()}
|
||||||
onContextMenu={(e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
setContextCoordinates({ x: e.pageX, y: e.pageY });
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<DropTargetStyling draggingClassName="bg-slate-900 shadow-[0_0px_10px_0px] shadow-blue-800/50 ">
|
<DropTargetStyling draggingClassName="bg-slate-900 shadow-[0_0px_10px_0px] shadow-blue-800/50 ">
|
||||||
{/* <DayContextMenu
|
|
||||||
day={day}
|
|
||||||
coordinates={contextCoordinates}
|
|
||||||
hideContextMenu={() => setContextCoordinates(undefined)}
|
|
||||||
/> */}
|
|
||||||
|
|
||||||
<DayTitle day={day} dayAsDate={dayAsDate} />
|
<DayTitle day={day} dayAsDate={dayAsDate} />
|
||||||
<div>
|
<div>
|
||||||
{todaysAssignments.map(
|
{todaysAssignments.map(
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ const Tooltip: React.FC<{
|
|||||||
targetRef: React.RefObject<HTMLElement>;
|
targetRef: React.RefObject<HTMLElement>;
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
}> = ({ message, targetRef, visible }) => {
|
}> = ({ message, targetRef, visible }) => {
|
||||||
|
|
||||||
const rect = targetRef.current?.getBoundingClientRect();
|
const rect = targetRef.current?.getBoundingClientRect();
|
||||||
|
|
||||||
return createPortal(
|
return createPortal(
|
||||||
|
|||||||
@@ -137,7 +137,3 @@ select {
|
|||||||
.markdownPreview a {
|
.markdownPreview a {
|
||||||
@apply text-blue-500 hover:text-blue-600 font-bold underline;
|
@apply text-blue-500 hover:text-blue-600 font-bold underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .isDragging .dayDropTarget {
|
|
||||||
@apply bg-slate-900 shadow-[0_0px_10px_0px] shadow-blue-800/50;
|
|
||||||
} */
|
|
||||||
|
|||||||
Reference in New Issue
Block a user