mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-05 19:40:09 +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>
|
<p class="menu-label">General</p>
|
||||||
<ul class="menu-list">
|
<ul class="menu-list">
|
||||||
<li><a href="/">Frontpage</a></li>
|
<li><a href="/">Frontpage</a></li>
|
||||||
<li><a id='itemUploads'>Uploads</a></li>
|
<li><a onclick="panel.getUploads()">Uploads</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<p class="menu-label">Albums</p>
|
<p class="menu-label">Albums</p>
|
||||||
<ul class="menu-list">
|
<ul class="menu-list">
|
||||||
<li><a id='itemManageGallery'>Manage your albums</a></li>
|
<li><a onclick="panel.getAlbums()">Manage your albums</a></li>
|
||||||
<li>
|
<li>
|
||||||
<ul id='albumsContainer'></ul>
|
<ul id='albumsContainer'></ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p class="menu-label">Administration</p>
|
<p class="menu-label">Administration</p>
|
||||||
<ul class="menu-list">
|
<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>
|
</ul>
|
||||||
</aside>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
|
@ -54,6 +54,7 @@ panel.prepareDashboard = function(){
|
|||||||
document.getElementById('auth').style.display = 'none';
|
document.getElementById('auth').style.display = 'none';
|
||||||
document.getElementById('dashboard').style.display = 'block';
|
document.getElementById('dashboard').style.display = 'block';
|
||||||
|
|
||||||
|
/*
|
||||||
document.getElementById('itemUploads').addEventListener('click', function(){
|
document.getElementById('itemUploads').addEventListener('click', function(){
|
||||||
panel.getUploads();
|
panel.getUploads();
|
||||||
});
|
});
|
||||||
@ -65,10 +66,16 @@ panel.prepareDashboard = function(){
|
|||||||
document.getElementById('itemTokens').addEventListener('click', function(){
|
document.getElementById('itemTokens').addEventListener('click', function(){
|
||||||
panel.changeTokens();
|
panel.changeTokens();
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
panel.getAlbumsSidebar();
|
panel.getAlbumsSidebar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
panel.logout = function(){
|
||||||
|
localStorage.removeItem("admintoken");
|
||||||
|
location.reload('/');
|
||||||
|
}
|
||||||
|
|
||||||
panel.getUploads = function(album = undefined, page = undefined){
|
panel.getUploads = function(album = undefined, page = undefined){
|
||||||
|
|
||||||
if(page === undefined) page = 0;
|
if(page === undefined) page = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user