mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-12 23:46:22 +00:00
Added logout to dashboard
This commit is contained in:
parent
4d83ff5a28
commit
8ee1540c82
@ -42,18 +42,19 @@
|
||||
<p class="menu-label">General</p>
|
||||
<ul class="menu-list">
|
||||
<li><a href="/">Frontpage</a></li>
|
||||
<li><a id='itemUploads'>Uploads</a></li>
|
||||
<li><a onclick="panel.getUploads()">Uploads</a></li>
|
||||
</ul>
|
||||
<p class="menu-label">Albums</p>
|
||||
<ul class="menu-list">
|
||||
<li><a id='itemManageGallery'>Manage your albums</a></li>
|
||||
<li><a onclick="panel.getAlbums()">Manage your albums</a></li>
|
||||
<li>
|
||||
<ul id='albumsContainer'></ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="menu-label">Administration</p>
|
||||
<ul class="menu-list">
|
||||
<li><a id="itemTokens">Change your tokens</a></li>
|
||||
<li><a onclick="panel.changeTokens()">Change your tokens</a></li>
|
||||
<li><a onclick="panel.logout()">Logout</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
</div>
|
||||
|
@ -54,6 +54,7 @@ panel.prepareDashboard = function(){
|
||||
document.getElementById('auth').style.display = 'none';
|
||||
document.getElementById('dashboard').style.display = 'block';
|
||||
|
||||
/*
|
||||
document.getElementById('itemUploads').addEventListener('click', function(){
|
||||
panel.getUploads();
|
||||
});
|
||||
@ -65,10 +66,16 @@ panel.prepareDashboard = function(){
|
||||
document.getElementById('itemTokens').addEventListener('click', function(){
|
||||
panel.changeTokens();
|
||||
});
|
||||
*/
|
||||
|
||||
panel.getAlbumsSidebar();
|
||||
}
|
||||
|
||||
panel.logout = function(){
|
||||
localStorage.removeItem("admintoken");
|
||||
location.reload('/');
|
||||
}
|
||||
|
||||
panel.getUploads = function(album = undefined, page = undefined){
|
||||
|
||||
if(page === undefined) page = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user