From f0de7a195ce3a464c880b833350f5a1b5bd65f70 Mon Sep 17 00:00:00 2001 From: Brian DeRocher Date: Mon, 25 Nov 2024 19:32:44 -0500 Subject: [PATCH] logout --- src/components/TopBar.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/TopBar.vue b/src/components/TopBar.vue index 27d2a33..6433609 100644 --- a/src/components/TopBar.vue +++ b/src/components/TopBar.vue @@ -18,6 +18,10 @@ watch(() => route.meta, (newVal, oldVal) => { const toggle = (event) => { menu.value.toggle(event); }; +const logout = () => { + userStore.logout(); +}; + const menu = ref(); const localActions = [{ @@ -30,6 +34,11 @@ const localActions = [{ needsAuth: true, }]; const allActions = [...userActions, ...localActions]; +allActions.map((item) => { + if (item.cmd === 'logout') { + item.command = logout; + } +}); const items = ref(allActions);