From 8ee1540c825a8fab64257a726da9ada17bef533b Mon Sep 17 00:00:00 2001 From: Pitu Date: Sat, 21 Jan 2017 19:04:14 -0300 Subject: [PATCH] Added logout to dashboard --- pages/panel.html | 7 ++++--- public/js/panel.js | 7 +++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pages/panel.html b/pages/panel.html index edf3959..4e4ce52 100644 --- a/pages/panel.html +++ b/pages/panel.html @@ -42,18 +42,19 @@ diff --git a/public/js/panel.js b/public/js/panel.js index 0f885cd..ae7529e 100644 --- a/public/js/panel.js +++ b/public/js/panel.js @@ -54,6 +54,7 @@ panel.prepareDashboard = function(){ document.getElementById('auth').style.display = 'none'; document.getElementById('dashboard').style.display = 'block'; + /* document.getElementById('itemUploads').addEventListener('click', function(){ panel.getUploads(); }); @@ -65,10 +66,16 @@ panel.prepareDashboard = function(){ document.getElementById('itemTokens').addEventListener('click', function(){ panel.changeTokens(); }); + */ panel.getAlbumsSidebar(); } +panel.logout = function(){ + localStorage.removeItem("admintoken"); + location.reload('/'); +} + panel.getUploads = function(album = undefined, page = undefined){ if(page === undefined) page = 0;