From 81fd5f31f5be465fc887272c34b4348ed756715d Mon Sep 17 00:00:00 2001 From: sickerine Date: Sat, 28 Nov 2026 20:49:59 +0000 Subject: [PATCH 01/14] feat(reports): mock daily hours and a meeting link for new reports Between dates gets Daily hours: all day, or from and to times on picked weekdays, with each day drawn and how far through its hours now is. A meeting link (Zoom, Google Meet, Teams or any call) is optional: authors see a Join button on the Publish page while new reports are open, and a shut one with the next opening while they wait for the hours. Mock state lives in this browser, so shared dev's settings are never changed. --- components/icons.tsx | 1 + components/icons/meeting-icons.tsx | 46 ++++ components/reports/intake-mock.ts | 40 +++ components/reports/intake-notice.tsx | 82 ++++++- components/reports/new-report-settings.tsx | 269 +++++++++++++++++++-- components/reports/publish-flow.tsx | 18 +- convex/reports/intake.ts | 1 + lib/reports/intake.ts | 65 ++++- messages/en-GB.json | 62 ++++- messages/en-US.json | 62 ++++- 10 files changed, 601 insertions(+), 45 deletions(-) create mode 100644 components/icons/meeting-icons.tsx create mode 100644 components/reports/intake-mock.ts diff --git a/components/icons.tsx b/components/icons.tsx index ad71d8099..d5797ce64 100644 --- a/components/icons.tsx +++ b/components/icons.tsx @@ -62,6 +62,7 @@ export { QuoteIcon, QuoteIcon as Quote } from "@solar-icons/react/bold-duotone/q export { Dialog2Icon as LanguagesIcon, Dialog2Icon as Languages } from "@solar-icons/react/bold-duotone/dialog-2"; export { Chart2Icon as AnalyticsIcon, Chart2Icon as BarChart3 } from "@solar-icons/react/bold-duotone/chart-2"; export { LinkIcon, LinkIcon as Link2 } from "@solar-icons/react/bold-duotone/link"; +export { VideocameraIcon as Video } from "@solar-icons/react/bold-duotone/videocamera"; export { Plane2Icon as PublishIcon, Plane2Icon as Send } from "@solar-icons/react/bold-duotone/plane-2"; export { TrashBinTrashIcon as TrashIcon, TrashBinTrashIcon as Trash2 } from "@solar-icons/react/bold-duotone/trash-bin-trash"; export { Book2Icon as BookIcon, Book2Icon as BookOpen } from "@solar-icons/react/bold-duotone/book-2"; diff --git a/components/icons/meeting-icons.tsx b/components/icons/meeting-icons.tsx new file mode 100644 index 000000000..de8cd86ff --- /dev/null +++ b/components/icons/meeting-icons.tsx @@ -0,0 +1,46 @@ +// The services a meeting link can be on, by its address: their own marks, and a camera for any other. + +import { Video } from "@/components/icons"; + +export type MeetingService = "zoom" | "meet" | "teams" | "other"; + +/** Which service a meeting link is on. */ +export function serviceOf(url: string): MeetingService { + let host = ""; + try { + host = new URL(url).hostname.toLowerCase(); + } catch { + return "other"; + } + if (host === "zoom.us" || host.endsWith(".zoom.us") || host.endsWith(".zoomgov.com")) return "zoom"; + if (host === "meet.google.com") return "meet"; + if (host === "teams.microsoft.com" || host === "teams.live.com" || host.endsWith(".teams.microsoft.com")) return "teams"; + return "other"; +} + +/** Zoom's app mark: its camera, white on its blue. */ +function ZoomMark({ className }: { className?: string }) { + return ( + + + + + ); +} + +/** Google Meet's mark (Simple Icons). */ +function MeetMark({ className }: { className?: string }) { + return ( + + + + ); +} + +/** The mark for a meeting link's service. Teams has no mark it lets others draw, so it takes the camera. */ +export function MeetingMark({ url, className }: { url: string; className?: string }) { + const service = serviceOf(url); + if (service === "zoom") return ; + if (service === "meet") return ; + return