Add logout button to the sidebar

This commit is contained in:
VPS 4 Builder
2026-05-26 04:30:46 +02:00
parent a04dea830b
commit 20372c6202
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -34,6 +34,12 @@ function showErrorBanner(msg, detail = '') {
setTimeout(() => banner && banner.remove(), 8000);
}
function logout() {
localStorage.removeItem('auth_token');
localStorage.removeItem('token');
window.location.href = '/login';
}
function getAuthToken() {
return localStorage.getItem('auth_token');
}