(e)
| 53 | } |
| 54 | |
| 55 | _onPaste(e) { |
| 56 | const files = e.clipboardData.files || e.clipboardData.items |
| 57 | .filter(i => i.type.indexOf('image') > -1) |
| 58 | .map(i => i.getAsFile()); |
| 59 | const peers = document.querySelectorAll('x-peer'); |
| 60 | // send the pasted image content to the only peer if there is one |
| 61 | // otherwise, select the peer somehow by notifying the client that |
| 62 | // "image data has been pasted, click the client to which to send it" |
| 63 | // not implemented |
| 64 | if (files.length > 0 && peers.length === 1) { |
| 65 | Events.fire('files-selected', { |
| 66 | files: files, |
| 67 | to: $$('x-peer').id |
| 68 | }); |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | class PeerUI { |
no test coverage detected