From 7b8f9e3050655656b27438056deed0c9688ff917 Mon Sep 17 00:00:00 2001 From: Anders Holck Date: Tue, 26 May 2026 23:06:08 +0200 Subject: [PATCH] Add logout button --- frontend/src/App.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 64d2771..d9bf46e 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -18,6 +18,7 @@ + @@ -348,6 +349,14 @@ async function login() { } } +function logout() { + api('/api/auth/logout', {}).catch(() => {}) + token.value = '' + setToken('') + authenticated.value = false + window.removeEventListener('online', syncPending) +} + async function syncPending() { const pending = await getPendingChanges() for (const item of pending) {