From e6ec03acff18b4638be18aadf9b7a3ebd20b2fc2 Mon Sep 17 00:00:00 2001 From: Midas Date: Tue, 20 Jun 2023 16:17:14 +0100 Subject: [PATCH] Some more fixes --- .../AvailabilityViewer/AvailabilityViewer.tsx | 13 +++---------- frontend/src/i18n/locales/en/event.json | 10 ++-------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/frontend/src/components/AvailabilityViewer/AvailabilityViewer.tsx b/frontend/src/components/AvailabilityViewer/AvailabilityViewer.tsx index e667c41..3a20380 100644 --- a/frontend/src/components/AvailabilityViewer/AvailabilityViewer.tsx +++ b/frontend/src/components/AvailabilityViewer/AvailabilityViewer.tsx @@ -101,15 +101,9 @@ const AvailabilityViewer = ({ times, people, table }: AvailabilityViewerProps) = people: peopleHere, }) }} - onMouseDown={e => { - setTooltip({ - anchor: e.currentTarget, - available: `${peopleHere.length} / ${filteredPeople.length} ${t('available')}`, - date: cell.label, - people: peopleHere, - }) - let text2Clipboard = t("copy.message") + cell.label + ":\n" + peopleHere.join(';\n') + ";"; - navigator.clipboard.writeText(text2Clipboard); + onClick={() => { + const clipboardMessage = `${t('group.clipboard_message', { date: cell.label })}:\n${peopleHere.join(', ')}` + navigator.clipboard.writeText(clipboardMessage); }} onMouseLeave={() => setTooltip(undefined)} @@ -141,7 +135,6 @@ const AvailabilityViewer = ({ times, people, table }: AvailabilityViewerProps) = /> {t('group.info1')} - {t('group.info3')} {people.length > 1 && <> {t('group.info2')}
diff --git a/frontend/src/i18n/locales/en/event.json b/frontend/src/i18n/locales/en/event.json index e56cbef..5d691e2 100644 --- a/frontend/src/i18n/locales/en/event.json +++ b/frontend/src/i18n/locales/en/event.json @@ -48,15 +48,9 @@ "group": { "legend_tooltip": "Click to highlight highest availability", - "info1": "Hover or tap the calendar below to see who is available", + "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", - "info3": "Click on a time slot to copy a list of people who are available then" - - }, - - "copy": { - "alert": "List of available people copied to clipboard!", - "message": "List of available people at " + "clipboard_message": "People available on {{date}}" }, "you": {