From 81f17078351926ed37041bd43d23bea8a79259e1 Mon Sep 17 00:00:00 2001 From: Onestay Date: Sun, 23 Apr 2017 14:09:44 +0200 Subject: only display album select when user is logged in It still needs additional styling and stuff --- public/js/home.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'public/js') diff --git a/public/js/home.js b/public/js/home.js index 6253c10..a3725e0 100644 --- a/public/js/home.js +++ b/public/js/home.js @@ -16,7 +16,6 @@ upload.checkIfPublic = function(){ return swal("An error ocurred", 'There was an error with the request, please check the console for more information.', "error"); console.log(error); }); - } upload.preparePage = function(){ @@ -61,6 +60,10 @@ upload.verifyToken = function(token, reloadOnError){ } upload.prepareUpload = function(){ + + if (upload.token) { + document.getElementById('albumDiv').style.display = 'block'; + } div = document.createElement('div'); div.id = 'dropzone'; @@ -74,7 +77,7 @@ upload.prepareUpload = function(){ document.getElementById('loginLinkText').innerHTML = 'Create an account and keep track of your uploads'; document.getElementById('uploadContainer').appendChild(div); - + upload.prepareDropzone(); } -- cgit v1.2.3