From 474eb9290ff5c7503adccf970a74cc6ae89e8c31 Mon Sep 17 00:00:00 2001 From: schlagmichdoch Date: Tue, 17 Jan 2023 14:00:01 +0100 Subject: [PATCH] small fixes and style changes --- public/index.html | 6 +++--- public/scripts/network.js | 4 ++-- public/scripts/ui.js | 9 +++++++-- public/styles.css | 7 ++++++- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/public/index.html b/public/index.html index 8a68d93..c41f774 100644 --- a/public/index.html +++ b/public/index.html @@ -128,11 +128,11 @@ - - + + -

PairDrop

+

diff --git a/public/scripts/network.js b/public/scripts/network.js index 2fc13b4..a0c1667 100644 --- a/public/scripts/network.js +++ b/public/scripts/network.js @@ -361,7 +361,7 @@ class Peer { this._onDownloadProgress(message.progress); break; case 'files-transfer-response': - this._onFileTransferResponded(message); + this._onFileTransferRequestResponded(message); break; case 'file-transfer-complete': this._onFileTransferCompleted(); @@ -456,7 +456,7 @@ class Peer { Events.fire('deactivate-paste-mode'); } - _onFileTransferResponded(message) { + _onFileTransferRequestResponded(message) { if (!message.accepted) { Events.fire('set-progress', {peerId: this._peerId, progress: 1, status: 'wait'}); diff --git a/public/scripts/ui.js b/public/scripts/ui.js index 7e94722..75eedd9 100644 --- a/public/scripts/ui.js +++ b/public/scripts/ui.js @@ -438,9 +438,10 @@ class ReceiveDialog extends Dialog { class ReceiveFileDialog extends ReceiveDialog { constructor() { - super('receiveDialog', false); + super('receiveFileDialog', false); this.$shareOrDownloadBtn = this.$el.querySelector('#shareOrDownload'); + this.$receiveTitleNode = this.$el.querySelector('#receiveTitle') Events.on('files-received', e => this._onFilesReceived(e.detail.sender, e.detail.files)); this._filesQueue = []; @@ -503,13 +504,16 @@ class ReceiveFileDialog extends ReceiveDialog { let description; let size; let filename; + let title; if (files.length === 1) { + title = 'PairDrop - File Received' description = files[0].name; size = this._formatFileSize(files[0].size); filename = files[0].name; url = URL.createObjectURL(files[0]) } else { + title = `PairDrop - ${files.length} Files Received` let completeSize = 0 for (let i=0; i