From fe2fef5e4cd43d078ef0311dbb1618615e96bdeb Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 8 Jun 2017 18:12:17 +0200 Subject: [PATCH 1/3] support dragging and dropping multiple files --- www/file/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/file/main.js b/www/file/main.js index 82c5d01fe..5d6542f24 100644 --- a/www/file/main.js +++ b/www/file/main.js @@ -361,7 +361,10 @@ define([ var dropped = e.originalEvent.dataTransfer.files; counter = 0; $label.removeClass('hovering'); - handleFile(dropped[0]); + + Array.prototype.slice.call(dropped).forEach(function (d) { + handleFile(d); + }); }); // we're in upload mode From f1a900241776922b354c276946b5943ea7b5b9a1 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 9 Jun 2017 10:46:11 +0200 Subject: [PATCH 2/3] use upgradeURL with usage bar --- www/common/cryptpad-common.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 86ff53c14..659fe198a 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -23,11 +23,13 @@ define([ Additionally, there is some basic functionality for import/export. */ + + var origin = encodeURIComponent(window.location.hostname); var common = window.Cryptpad = { Messages: Messages, Clipboard: Clipboard, - donateURL: 'https://accounts.cryptpad.fr/#/donate?on=' + window.location.hostname, - upgradeURL: 'https://accounts.cryptpad.fr/#/?on=' + window.location.hostname, + donateURL: 'https://accounts.cryptpad.fr/#/donate?on=' + origin, + upgradeURL: 'https://accounts.cryptpad.fr/#/?on=' + origin, account: {}, }; @@ -829,9 +831,9 @@ define([ (quota >= 0.8 || alwaysDisplayUpgrade) && data.plan !== "power") { - var origin = encodeURIComponent(window.location.hostname); + // TODO show donate url if applicable var $upgradeLink = $('', { - href: "https://accounts.cryptpad.fr/#!on=" + origin, + href: common.upgradeLink, rel: "noreferrer noopener", target: "_blank", }).appendTo($container); From ca95b5c42b174be1e3c8b4c5fa67cca50050674b Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 9 Jun 2017 12:31:07 +0200 Subject: [PATCH 3/3] Remove unused console.log --- www/common/common-title.js | 1 - 1 file changed, 1 deletion(-) diff --git a/www/common/common-title.js b/www/common/common-title.js index f5485d86d..226dc1b34 100644 --- a/www/common/common-title.js +++ b/www/common/common-title.js @@ -40,7 +40,6 @@ define(function () { var renameCb = function (err, newTitle) { if (err) { return; } updateLocalTitle(newTitle); - console.log('here'); onLocal(); };