mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-09 11:57:28 -08:00
32 lines
652 B
Vue
32 lines
652 B
Vue
|
<script lang="ts">
|
||
|
import { VIEWS } from '@/constants';
|
||
|
import { mapStores } from 'pinia';
|
||
|
import { useUsersStore } from '@/stores/users';
|
||
|
import mixins from 'vue-typed-mixins';
|
||
|
import { showMessage } from '@/mixins/showMessage';
|
||
|
|
||
|
export default mixins(showMessage).extend({
|
||
|
name: 'SignoutView',
|
||
|
computed: {
|
||
|
...mapStores(useUsersStore),
|
||
|
},
|
||
|
methods: {
|
||
|
async logout() {
|
||
|
try {
|
||
|
await this.usersStore.logout();
|
||
|
this.$router.replace({ name: VIEWS.SIGNIN });
|
||
|
} catch (e) {
|
||
|
this.$showError(e, this.$locale.baseText('auth.signout.error'));
|
||
|
}
|
||
|
},
|
||
|
},
|
||
|
mounted() {
|
||
|
this.logout();
|
||
|
},
|
||
|
});
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
|
<div />
|
||
|
</template>
|