From 1ec6bbb640d4c7a5f29d7c02ab89a7ab0c1daa1a Mon Sep 17 00:00:00 2001 From: Pitu Date: Mon, 30 Jan 2017 06:00:01 -0300 Subject: No more asking token on front if private --- public/js/upload.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'public/js') 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(); -- cgit v1.2.3