mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-05 19:40:09 +00:00
No more asking token on front if private
This commit is contained in:
parent
66e7b676d9
commit
1ec6bbb640
@ -25,12 +25,7 @@
|
|||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column is-hidden-mobile"></div>
|
<div class="column is-hidden-mobile"></div>
|
||||||
<div class="column" id='uploadContainer'>
|
<div class="column" id='uploadContainer'>
|
||||||
|
<a id="loginToUpload" href="/auth" class="button is-danger">Running in private mode. Log in to upload.</a>
|
||||||
<p id='tokenContainer' class="control has-addons has-addons-centered">
|
|
||||||
<input id='token' class="input is-danger" type="text" placeholder="Your token">
|
|
||||||
<a id='tokenSubmit' class="button is-danger">Check</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="column is-hidden-mobile"></div>
|
<div class="column is-hidden-mobile"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,13 +21,7 @@ upload.checkIfPublic = function(){
|
|||||||
|
|
||||||
upload.preparePage = function(){
|
upload.preparePage = function(){
|
||||||
if(!upload.isPrivate) return upload.prepareUpload();
|
if(!upload.isPrivate) return upload.prepareUpload();
|
||||||
if(!upload.token){
|
if(!upload.token) return document.getElementById('loginToUpload').style.display = 'inline-flex';
|
||||||
document.getElementById('tokenSubmit').addEventListener('click', function(){
|
|
||||||
upload.verifyToken(document.getElementById('token').value)
|
|
||||||
});
|
|
||||||
document.getElementById('tokenContainer').style.display = 'flex';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
upload.verifyToken(upload.token, true);
|
upload.verifyToken(upload.token, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,7 +68,7 @@ upload.prepareUpload = function(){
|
|||||||
div.style.display = 'flex';
|
div.style.display = 'flex';
|
||||||
|
|
||||||
document.getElementById('maxFileSize').innerHTML = 'Maximum upload size per file is ' + upload.maxFileSize;
|
document.getElementById('maxFileSize').innerHTML = 'Maximum upload size per file is ' + upload.maxFileSize;
|
||||||
document.getElementById('tokenContainer').style.display = 'none';
|
document.getElementById('loginToUpload').style.display = 'none';
|
||||||
document.getElementById('uploadContainer').appendChild(div);
|
document.getElementById('uploadContainer').appendChild(div);
|
||||||
|
|
||||||
upload.prepareDropzone();
|
upload.prepareDropzone();
|
||||||
|
Loading…
Reference in New Issue
Block a user