Update ui.js
This commit is contained in:
parent
3be3be6926
commit
097c3c3f50
1 changed files with 2 additions and 2 deletions
|
@ -47,12 +47,12 @@ class PeersUI {
|
||||||
const files = e.clipboardData.files || e.clipboardData.items
|
const files = e.clipboardData.files || e.clipboardData.items
|
||||||
.filter(i => i.type.indexOf('image') > -1)
|
.filter(i => i.type.indexOf('image') > -1)
|
||||||
.map(i => i.getAsFile());
|
.map(i => i.getAsFile());
|
||||||
|
const peers = document.querySelectorAll('x-peer').length;
|
||||||
// send the pasted image content to the only peer if there is one
|
// send the pasted image content to the only peer if there is one
|
||||||
// otherwise, select the peer somehow by notifying the client that
|
// otherwise, select the peer somehow by notifying the client that
|
||||||
// "image data has been pasted, click the client to which to send it"
|
// "image data has been pasted, click the client to which to send it"
|
||||||
// not implemented
|
// not implemented
|
||||||
if (files.length > 0 && $$('x-peer').length === 1) {
|
if (files.length > 0 && peers.length === 1) {
|
||||||
Events.fire('files-selected', {
|
Events.fire('files-selected', {
|
||||||
files: files,
|
files: files,
|
||||||
to: $$('x-peer').id
|
to: $$('x-peer').id
|
||||||
|
|
Loading…
Reference in a new issue