mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
Fix file attach from clipboard when copy from browser. Closes #96
This commit is contained in:
parent
4a0a0abaef
commit
560c2856e6
7 changed files with 7914 additions and 14560 deletions
19678
client/package-lock.json
generated
19678
client/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -45,7 +45,18 @@ const AttachmentAddZone = React.memo(({ children, onCreate }) => {
|
|||
|
||||
useEffect(() => {
|
||||
const handlePaste = (event) => {
|
||||
const item = event.clipboardData && event.clipboardData.items[0];
|
||||
if (!event.clipboardData) {
|
||||
return;
|
||||
}
|
||||
|
||||
const file = event.clipboardData.files[0];
|
||||
|
||||
if (file) {
|
||||
submit(file);
|
||||
return;
|
||||
}
|
||||
|
||||
const item = event.clipboardData.items[0];
|
||||
|
||||
if (!item) {
|
||||
return;
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
import dateFns from 'date-fns/locale/fr';
|
||||
|
||||
export default {
|
||||
dateFns,
|
||||
|
||||
format: {
|
||||
date: 'P',
|
||||
time: 'HH:mm',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue