diff --git a/src/App.vue b/src/App.vue index 539db8e7b..4acd50538 100644 --- a/src/App.vue +++ b/src/App.vue @@ -156,10 +156,6 @@ export default { keyboardShortcutsActive: KEYBOARD_SHORTCUTS_ACTIVE, }), methods: { - logout() { - this.$store.dispatch('auth/logout') - router.push({name: 'user.login'}) - }, loadNamespaces() { this.$store.dispatch('namespaces/loadNamespaces') }, diff --git a/src/components/home/contentLinkShare.vue b/src/components/home/contentLinkShare.vue index 9c364ef37..f1cac7aeb 100644 --- a/src/components/home/contentLinkShare.vue +++ b/src/components/home/contentLinkShare.vue @@ -38,6 +38,12 @@ export default { currentList: CURRENT_LIST, background: 'background', }), + methods: { + logout() { + this.$store.dispatch('auth/logout') + this.$router.push({name: 'user.login'}) + }, + }, } diff --git a/src/components/home/topNavigation.vue b/src/components/home/topNavigation.vue index a843a0ec3..409534dec 100644 --- a/src/components/home/topNavigation.vue +++ b/src/components/home/topNavigation.vue @@ -115,5 +115,11 @@ export default { privacyPolicyUrl: state => state.config.legal.privacyPolicyUrl, canWriteCurrentList: state => state.currentList.maxRight > Rights.READ, }), + methods: { + logout() { + this.$store.dispatch('auth/logout') + this.$router.push({name: 'user.login'}) + }, + }, }