aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorkanadeko <[email protected]>2017-01-14 06:06:01 -0300
committerkanadeko <[email protected]>2017-01-14 06:06:01 -0300
commit3b648ab45ea3dbcf41f39f5cc9c6244ea381f6ae (patch)
treec235a87604908953a5bcd78fd19620c912030edf /public
parentIP whitelisting (diff)
downloadhost.fuwn.me-3b648ab45ea3dbcf41f39f5cc9c6244ea381f6ae.tar.xz
host.fuwn.me-3b648ab45ea3dbcf41f39f5cc9c6244ea381f6ae.zip
Frontend ip blocking
Diffstat (limited to 'public')
-rw-r--r--public/css/style.css3
-rw-r--r--public/index.html10
2 files changed, 10 insertions, 3 deletions
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 @@
<div class="columns">
<div class="column"></div>
<div class="column">
+ <a class="button is-danger is-outlined" id='btnGithub' href='https://github.com/kanadeko/loli-safe' target='_blank'>View on Github</a>
<div id="dropzone">Click here or drag and drop files</div>
</div>
<div class="column"></div>
@@ -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);