From 1ec6bbb640d4c7a5f29d7c02ab89a7ab0c1daa1a Mon Sep 17 00:00:00 2001 From: Pitu Date: Mon, 30 Jan 2017 06:00:01 -0300 Subject: [PATCH] No more asking token on front if private --- pages/home.html | 7 +------ public/js/upload.js | 10 ++-------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/pages/home.html b/pages/home.html index 256c856..eebbdcd 100644 --- a/pages/home.html +++ b/pages/home.html @@ -25,12 +25,7 @@
diff --git a/public/js/upload.js b/public/js/upload.js index b52f670..5b5ad6b 100644 --- a/public/js/upload.js +++ b/public/js/upload.js @@ -21,13 +21,7 @@ upload.checkIfPublic = function(){ upload.preparePage = function(){ if(!upload.isPrivate) return upload.prepareUpload(); - if(!upload.token){ - document.getElementById('tokenSubmit').addEventListener('click', function(){ - upload.verifyToken(document.getElementById('token').value) - }); - document.getElementById('tokenContainer').style.display = 'flex'; - return; - } + if(!upload.token) return document.getElementById('loginToUpload').style.display = 'inline-flex'; upload.verifyToken(upload.token, true); } @@ -74,7 +68,7 @@ upload.prepareUpload = function(){ div.style.display = 'flex'; document.getElementById('maxFileSize').innerHTML = 'Maximum upload size per file is ' + upload.maxFileSize; - document.getElementById('tokenContainer').style.display = 'none'; + document.getElementById('loginToUpload').style.display = 'none'; document.getElementById('uploadContainer').appendChild(div); upload.prepareDropzone();