Merge pull request #282 from Midas-sudo/feat/ClipboardCopy
Added the feature to copy the list of available people to the Clipboard
This commit is contained in:
commit
c22dc1c7b4
|
|
@ -101,6 +101,10 @@ const AvailabilityViewer = ({ times, people, table }: AvailabilityViewerProps) =
|
||||||
people: peopleHere,
|
people: peopleHere,
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
const clipboardMessage = `${t('group.clipboard_message', { date: cell.label })}:\n${peopleHere.join(', ')}`
|
||||||
|
navigator.clipboard.writeText(clipboardMessage)
|
||||||
|
}}
|
||||||
onMouseLeave={() => setTooltip(undefined)}
|
onMouseLeave={() => setTooltip(undefined)}
|
||||||
/>
|
/>
|
||||||
})}
|
})}
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,9 @@
|
||||||
|
|
||||||
"group": {
|
"group": {
|
||||||
"legend_tooltip": "Click to highlight highest availability",
|
"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"
|
"info2": "Click the names below to view people individually",
|
||||||
|
"clipboard_message": "People available on {{date}}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"you": {
|
"you": {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue