Initial LinkLog implementation

This commit is contained in:
Olaf
2026-08-24 14:30:30 +02:00
commit 1c827956c4
50 changed files with 3436 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
(() => {
const logoutButton = document.querySelector('#logout-button');
logoutButton.addEventListener('click', async () => {
const token = localStorage.getItem('linklogAccessToken');
logoutButton.disabled = true;
logoutButton.textContent = 'Signing out...';
if (token) {
await fetch('/api/auth/logout', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({token}),
}).catch(() => undefined);
}
localStorage.removeItem('linklogAccessToken');
window.location.assign('/login');
});
})();