diff --git a/app/_components/event-comment.tsx b/app/_components/event-comment.tsx index a53b381d..291d61b6 100644 --- a/app/_components/event-comment.tsx +++ b/app/_components/event-comment.tsx @@ -84,7 +84,7 @@ const EventComment = ({ )} - + {content} diff --git a/app/_components/session-form.tsx b/app/_components/session-form.tsx index 837a2f0c..b9a63368 100644 --- a/app/_components/session-form.tsx +++ b/app/_components/session-form.tsx @@ -83,7 +83,7 @@ const SessionForm = ({ const [isTransitioning, startTransition] = useTransition(); const [ogScheduledFor, setOgScheduledFor] = useState(null); const [scheduleModal, toggleScheduleModal] = useToggle(false); - const currentOrder = (isDuplicate ? order : session?.order ?? order) ?? 0; + const currentOrder = (isDuplicate ? order : (session?.order ?? order)) ?? 0; const modules = forceArray(session?.modules); const router = useRouter(); const sensors = useSensors(useSensor(PointerSensor)); @@ -99,7 +99,7 @@ const SessionForm = ({ cacheKey, { defaultValues: { - draft: isDuplicate ? true : session?.draft ?? true, + draft: isDuplicate ? true : (session?.draft ?? true), modules: modules.length ? modules.map((module) => ({ content: module.content ?? '', diff --git a/app/_components/session-page.tsx b/app/_components/session-page.tsx index 3153670b..dbbda011 100644 --- a/app/_components/session-page.tsx +++ b/app/_components/session-page.tsx @@ -80,7 +80,7 @@ const SessionPage = async ({ ) : ( <> {session.title && ( -

+

{session.title}

)} diff --git a/app/_components/subject-page.tsx b/app/_components/subject-page.tsx index 1c139224..6108e39e 100644 --- a/app/_components/subject-page.tsx +++ b/app/_components/subject-page.tsx @@ -1,10 +1,10 @@ import Avatar from '@/_components/avatar'; -import BackIconButton from '@/_components/back-icon-button'; import Button from '@/_components/button'; import DirtyHtml from '@/_components/dirty-html'; import Empty from '@/_components/empty'; import EventTypes from '@/_components/event-types'; import ForwardSearchParamsButton from '@/_components/forward-search-params-button'; +import IconButton from '@/_components/icon-button'; import SubjectEventsDateFilter from '@/_components/subject-events-date-filter'; import SubjectMenu from '@/_components/subject-menu'; import TimelineEvents from '@/_components/timeline-events'; @@ -60,7 +60,8 @@ const SubjectPage = async ({
{!isPublic && ( - } label="Back" /> diff --git a/app/_components/timeline-event-card.tsx b/app/_components/timeline-event-card.tsx index 458fe40a..d421f09c 100644 --- a/app/_components/timeline-event-card.tsx +++ b/app/_components/timeline-event-card.tsx @@ -50,7 +50,7 @@ const TimelineEventCard = ({ formatter="time" />
diff --git a/app/_components/timeline-session-card.tsx b/app/_components/timeline-session-card.tsx index f7fc916f..bcb0cb8f 100644 --- a/app/_components/timeline-session-card.tsx +++ b/app/_components/timeline-session-card.tsx @@ -43,15 +43,15 @@ const TimelineSessionCard = ({ variant="link" >
-
+
{lastEventType?.session?.mission?.name}
- +
-
+
Session {sessionNumber} {lastEventType?.session?.title ? `: ${lastEventType.session.title}` @@ -84,7 +84,7 @@ const TimelineSessionCard = ({ /> diff --git a/app/_components/training-plans.tsx b/app/_components/training-plans.tsx index 5fc3e8f8..00977e8e 100644 --- a/app/_components/training-plans.tsx +++ b/app/_components/training-plans.tsx @@ -29,7 +29,7 @@ const TrainingPlans = async ({ isTeamMember, subjectId }: MissionsProps) => { > {isTeamMember && ( diff --git a/app/_queries/list-subject-training-plans.ts b/app/_queries/list-subject-training-plans.ts index c3ff1385..f505ab47 100644 --- a/app/_queries/list-subject-training-plans.ts +++ b/app/_queries/list-subject-training-plans.ts @@ -4,7 +4,7 @@ const listSubjectTrainingPlans = (subjectId: string) => createServerSupabaseClient() .from('missions') .select( - 'id, name, sessions(id, modules:event_types(event:events(id)), order)', + 'id, name, sessions(id, modules:event_types(event:events(id)), order, title)', ) .eq('subject_id', subjectId) .eq('archived', false) diff --git a/app/_utilities/format-event-filters.ts b/app/_utilities/format-event-filters.ts index 6b503b04..a40b6d18 100644 --- a/app/_utilities/format-event-filters.ts +++ b/app/_utilities/format-event-filters.ts @@ -12,9 +12,9 @@ const formatEventFilters = ({ }) => ({ endDate: add24Hours(parseShortIso(to ?? from)), from: 0, - pageSize: 25, + pageSize: 15, startDate: parseShortIso(from), - to: limit ? Number(limit) : 24, + to: limit ? Number(limit) : 14, }); export default formatEventFilters; diff --git a/bun.lockb b/bun.lockb index 96445c19..7946448a 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 728876a6..710a50b6 100644 --- a/package.json +++ b/package.json @@ -30,21 +30,21 @@ "@supabase/ssr": "^0.4.0", "@supabase/supabase-js": "^2.44.3", "@tailwindcss/typography": "^0.5.13", - "@tiptap/extension-bold": "^2.4.0", - "@tiptap/extension-bullet-list": "^2.4.0", - "@tiptap/extension-document": "^2.4.0", - "@tiptap/extension-history": "^2.4.0", - "@tiptap/extension-italic": "^2.4.0", - "@tiptap/extension-link": "^2.4.0", - "@tiptap/extension-list-item": "^2.4.0", - "@tiptap/extension-ordered-list": "^2.4.0", - "@tiptap/extension-paragraph": "^2.4.0", - "@tiptap/extension-placeholder": "^2.4.0", - "@tiptap/extension-text": "^2.4.0", - "@tiptap/extension-typography": "^2.4.0", - "@tiptap/extension-underline": "^2.4.0", - "@tiptap/extension-youtube": "^2.4.0", - "@tiptap/react": "^2.4.0", + "@tiptap/extension-bold": "^2.5.0", + "@tiptap/extension-bullet-list": "^2.5.0", + "@tiptap/extension-document": "^2.5.0", + "@tiptap/extension-history": "^2.5.0", + "@tiptap/extension-italic": "^2.5.0", + "@tiptap/extension-link": "^2.5.0", + "@tiptap/extension-list-item": "^2.5.0", + "@tiptap/extension-ordered-list": "^2.5.0", + "@tiptap/extension-paragraph": "^2.5.0", + "@tiptap/extension-placeholder": "^2.5.0", + "@tiptap/extension-text": "^2.5.0", + "@tiptap/extension-typography": "^2.5.0", + "@tiptap/extension-underline": "^2.5.0", + "@tiptap/extension-youtube": "^2.5.0", + "@tiptap/react": "^2.5.0", "@types/humanize-duration": "^3.27.4", "@types/lodash": "^4.17.6", "@types/react": "^18.3.3", diff --git a/tailwind.css b/tailwind.css index f9d7537f..4a35d3fd 100644 --- a/tailwind.css +++ b/tailwind.css @@ -57,7 +57,7 @@ /* hack to style tip tap youtube videos */ div[data-youtube-video] > iframe { - @apply aspect-video h-auto w-full rounded; + @apply my-1.5 aspect-video h-auto w-full rounded; } /* hack to style observable plot tooltip */