diff --git a/client/scripts/ui.js b/client/scripts/ui.js index 88735ab..599b3c3 100644 --- a/client/scripts/ui.js +++ b/client/scripts/ui.js @@ -19,12 +19,12 @@ class PeersUI { Events.on('peer-joined', e => this._onPeerJoined(e.detail)); Events.on('peer-left', e => this._onPeerLeft(e.detail)); Events.on('peers', e => this._onPeers(e.detail)); - Events.on('file-progress', e => this._onFileProgress(e.detail)); + Events.on('file-progress', e => this._onFileProgress(e.detail)); Events.on('paste', e => this._onPaste(e)); } _onPeerJoined(peer) { - if ($(peer.id)) return; // peer already exists + if ($(peer.id)) return; // peer already exists const peerUI = new PeerUI(peer); $$('x-peers').appendChild(peerUI.$el); } @@ -49,9 +49,9 @@ class PeersUI { _clearPeers() { const $peers = $$('x-peers').innerHTML = ''; - } - - _onPaste(e) { + } + + _onPaste(e) { const files = e.clipboardData.files || e.clipboardData.items .filter(i => i.type.indexOf('image') > -1) .map(i => i.getAsFile()); @@ -72,7 +72,7 @@ class PeersUI { class PeerUI { html() { - return ` + return `