diff options
author | vnugent <public@vaughnnugent.com> | 2024-01-07 01:53:03 -0500 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-01-07 01:53:03 -0500 |
commit | e01aae6c30f18003ceae07c092cddeb488e8f472 (patch) | |
tree | d7dd1b9bd931d1b274243bfb34fb44885c94e395 /front-end/src/App.vue | |
parent | ce77fe97522bc9c37ccc275efebb94e920c1f2ae (diff) |
package updates & social auth setup
Diffstat (limited to 'front-end/src/App.vue')
-rw-r--r-- | front-end/src/App.vue | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/front-end/src/App.vue b/front-end/src/App.vue index d6ac36f..2f29fde 100644 --- a/front-end/src/App.vue +++ b/front-end/src/App.vue @@ -3,7 +3,7 @@ <title>{{ metaTile }}</title> </head> <!-- Import environment component top level as the entrypoint --> - <Environment @logout="store.socialOauth.logout"> + <Environment @logout="logout"> <template #main> <router-view /> </template> @@ -15,6 +15,7 @@ import { computed } from 'vue'; import { useStore } from './store'; import { storeToRefs } from 'pinia'; import Environment from './bootstrap/Environment.vue'; +import { apiCall } from '@vnuge/vnlib.browser'; const store = useStore() const { siteTitle, pageTitle } = storeToRefs(store) @@ -22,6 +23,13 @@ const { siteTitle, pageTitle } = storeToRefs(store) //Compute meta title from the default site title and the page title const metaTile = computed(() => `${pageTitle.value} | ${siteTitle.value}`) +const logout = () => { + apiCall(async () => { + const { logout } = await store.socialOauth() + await logout() + }) +} + store.setSiteTitle('CMNext Admin') store.setPageTitle('Blog') |