mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-13 16:06:21 +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="column is-hidden-mobile"></div>
|
||||
<div class="column" id='uploadContainer'>
|
||||
|
||||
<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>
|
||||
|
||||
<a id="loginToUpload" href="/auth" class="button is-danger">Running in private mode. Log in to upload.</a>
|
||||
</div>
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
</div>
|
||||
|
@ -21,13 +21,7 @@ upload.checkIfPublic = function(){
|
||||
|
||||
upload.preparePage = function(){
|
||||
if(!upload.isPrivate) return upload.prepareUpload();
|
||||
if(!upload.token){
|
||||
document.getElementById('tokenSubmit').addEventListener('click', function(){
|
||||
upload.verifyToken(document.getElementById('token').value)
|
||||
});
|
||||
document.getElementById('tokenContainer').style.display = 'flex';
|
||||
return;
|
||||
}
|
||||
if(!upload.token) return document.getElementById('loginToUpload').style.display = 'inline-flex';
|
||||
upload.verifyToken(upload.token, true);
|
||||
}
|
||||
|
||||
@ -74,7 +68,7 @@ upload.prepareUpload = function(){
|
||||
div.style.display = 'flex';
|
||||
|
||||
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);
|
||||
|
||||
upload.prepareDropzone();
|
||||
|
Loading…
Reference in New Issue
Block a user