mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-19 01:31:34 +00:00
only display album select when user is logged in
It still needs additional styling and stuff
This commit is contained in:
parent
e2885bd37c
commit
81f1707835
@ -45,16 +45,27 @@
|
||||
<div class="hero-body">
|
||||
<div class="container">
|
||||
<p id="b">
|
||||
<img class='logo' src="/images/logo_smol.png">
|
||||
<img class="logo" src="/images/logo_smol.png">
|
||||
</p>
|
||||
<h1 class="title">loli-safe</h1>
|
||||
<h2 class="subtitle">A <strong>modern</strong> self-hosted file upload service</h2>
|
||||
|
||||
<h3 class="subtitle" id="maxFileSize"></h2>
|
||||
<h3 class="subtitle" id="maxFileSize"></h3>
|
||||
<div class="columns">
|
||||
<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>
|
||||
<div class="field" id="albumDiv" style="display: none">
|
||||
<label class="label">Album</label>
|
||||
<p class="control">
|
||||
<span class="select">
|
||||
<select>
|
||||
<option>Album 1</option>
|
||||
<option>Album 2</option>
|
||||
</select>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column is-hidden-mobile"></div>
|
||||
</div>
|
||||
|
@ -16,7 +16,6 @@ upload.checkIfPublic = function(){
|
||||
return swal("An error ocurred", 'There was an error with the request, please check the console for more information.', "error");
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
upload.preparePage = function(){
|
||||
@ -61,6 +60,10 @@ upload.verifyToken = function(token, reloadOnError){
|
||||
}
|
||||
|
||||
upload.prepareUpload = function(){
|
||||
|
||||
if (upload.token) {
|
||||
document.getElementById('albumDiv').style.display = 'block';
|
||||
}
|
||||
|
||||
div = document.createElement('div');
|
||||
div.id = 'dropzone';
|
||||
@ -74,7 +77,7 @@ upload.prepareUpload = function(){
|
||||
document.getElementById('loginLinkText').innerHTML = 'Create an account and keep track of your uploads';
|
||||
|
||||
document.getElementById('uploadContainer').appendChild(div);
|
||||
|
||||
|
||||
upload.prepareDropzone();
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user