diff --git a/frontend/src/components/AvailabilityViewer/AvailabilityViewer.tsx b/frontend/src/components/AvailabilityViewer/AvailabilityViewer.tsx index 05f31e1..a2e9869 100644 --- a/frontend/src/components/AvailabilityViewer/AvailabilityViewer.tsx +++ b/frontend/src/components/AvailabilityViewer/AvailabilityViewer.tsx @@ -101,6 +101,10 @@ const AvailabilityViewer = ({ times, people, table }: AvailabilityViewerProps) = people: peopleHere, }) }} + onClick={() => { + const clipboardMessage = `${t('group.clipboard_message', { date: cell.label })}:\n${peopleHere.join(', ')}` + navigator.clipboard.writeText(clipboardMessage) + }} onMouseLeave={() => setTooltip(undefined)} /> })} diff --git a/frontend/src/i18n/locales/en/event.json b/frontend/src/i18n/locales/en/event.json index b86712d..5d691e2 100644 --- a/frontend/src/i18n/locales/en/event.json +++ b/frontend/src/i18n/locales/en/event.json @@ -48,8 +48,9 @@ "group": { "legend_tooltip": "Click to highlight highest availability", - "info1": "Hover or tap the calendar below to see who is available", - "info2": "Click the names below to view people individually" + "info1": "Hover or tap the calendar below to see who is available, and click to copy details about a time slot", + "info2": "Click the names below to view people individually", + "clipboard_message": "People available on {{date}}" }, "you": {