From 999c148dff3d27e4a4d5b59d6408a015c2922320 Mon Sep 17 00:00:00 2001 From: Pitu Date: Tue, 31 Jan 2017 03:37:17 -0300 Subject: [PATCH] Changed /panel to /dashboard --- lolisafe.js | 2 +- pages/{panel.html => dashboard.html} | 2 +- pages/home.html | 2 +- public/js/auth.js | 4 ++-- public/js/{panel.js => dashboard.js} | 0 public/js/home.js | 5 ++++- 6 files changed, 9 insertions(+), 6 deletions(-) rename pages/{panel.html => dashboard.html} (97%) rename public/js/{panel.js => dashboard.js} (100%) diff --git a/lolisafe.js b/lolisafe.js index 74258f2..f31b70e 100644 --- a/lolisafe.js +++ b/lolisafe.js @@ -24,7 +24,7 @@ safe.use('/api', api) safe.get('/', (req, res, next) => res.sendFile('home.html', { root: './pages/' })) safe.get('/faq', (req, res, next) => res.sendFile('faq.html', { root: './pages/' })) safe.get('/auth', (req, res, next) => res.sendFile('auth.html', { root: './pages/' })) -safe.get('/panel', (req, res, next) => res.sendFile('panel.html', { root: './pages/' })) +safe.get('/dashboard', (req, res, next) => res.sendFile('dashboard.html', { root: './pages/' })) safe.use((req, res, next) => res.status(404).sendFile('404.html', { root: './pages/error/' })) safe.use((req, res, next) => res.status(500).sendFile('500.html', { root: './pages/error/' })) diff --git a/pages/panel.html b/pages/dashboard.html similarity index 97% rename from pages/panel.html rename to pages/dashboard.html index c8ae8cb..3b5303d 100644 --- a/pages/panel.html +++ b/pages/dashboard.html @@ -8,7 +8,7 @@ - + diff --git a/pages/home.html b/pages/home.html index e620513..86cb2a4 100644 --- a/pages/home.html +++ b/pages/home.html @@ -44,7 +44,7 @@

diff --git a/public/js/auth.js b/public/js/auth.js index 68cf9e3..ecc7c7c 100644 --- a/public/js/auth.js +++ b/public/js/auth.js @@ -20,7 +20,7 @@ page.do = function(dest){ return swal('Error', response.data.description, 'error'); localStorage.token = response.data.token; - window.location = '/panel'; + window.location = '/dashboard'; }) .catch(function (error) { @@ -41,7 +41,7 @@ page.verify = function(){ if(response.data.success === false) return swal('Error', response.data.description, 'error'); - window.location = '/panel'; + window.location = '/dashboard'; }) .catch(function (error) { diff --git a/public/js/panel.js b/public/js/dashboard.js similarity index 100% rename from public/js/panel.js rename to public/js/dashboard.js diff --git a/public/js/home.js b/public/js/home.js index cd06cc2..6253c10 100644 --- a/public/js/home.js +++ b/public/js/home.js @@ -69,7 +69,10 @@ upload.prepareUpload = function(){ document.getElementById('maxFileSize').innerHTML = 'Maximum upload size per file is ' + upload.maxFileSize; document.getElementById('loginToUpload').style.display = 'none'; - document.getElementById('loginLinkText').innerHTML = 'Create an account and keep track of your uploads'; + + if(upload.token === undefined) + document.getElementById('loginLinkText').innerHTML = 'Create an account and keep track of your uploads'; + document.getElementById('uploadContainer').appendChild(div); upload.prepareDropzone();