From 3b648ab45ea3dbcf41f39f5cc9c6244ea381f6ae Mon Sep 17 00:00:00 2001 From: kanadeko Date: Sat, 14 Jan 2017 06:06:01 -0300 Subject: Frontend ip blocking --- public/css/style.css | 3 ++- public/index.html | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'public') diff --git a/public/css/style.css b/public/css/style.css index 7cc0548..5fc58c7 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -28,7 +28,7 @@ div#dropzone { background-color: rgba(0, 0, 0, 0); border-color: #ff3860; color: #ff3860; - display: flex; + display: none; width: 100%; border-radius: 3px; box-shadow: none; @@ -49,6 +49,7 @@ div#dropzone:hover { border-color: #ff3860; color: #fff; } + img.logo { height: 200px; margin-top: 20px; } .dz-preview .dz-details { display: flex; } .dz-preview .dz-details .dz-size, .dz-preview .dz-details .dz-filename { flex: 1 } diff --git a/public/index.html b/public/index.html index dd2a12d..dcd4697 100644 --- a/public/index.html +++ b/public/index.html @@ -24,6 +24,7 @@
+ View on Github
Click here or drag and drop files
@@ -57,10 +58,15 @@ var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if (xhr.readyState == XMLHttpRequest.DONE) { + console.log(xhr.responseText) + if(xhr.responseText !== 'not-authorized'){ + document.getElementById('btnGithub').style.display = 'none'; + document.getElementById('dropzone').style.display = 'flex'; + } if(xhr.responseText.maxFileSize) - maxSize = xhr.responseText.maxFileSize + maxSize = xhr.responseText.maxFileSize; if(xhr.responseText.urlPrefix) - urlPrefix = xhr.responseText.urlPrefix + '/' + urlPrefix = xhr.responseText.urlPrefix + '/'; } } xhr.open('GET', '/api/info', true); -- cgit v1.2.3