2020-03-05 01:18:10 +00:00
|
|
|
<template>
|
|
|
|
|
<div>
|
2021-06-25 23:44:27 +00:00
|
|
|
<button v-close-popover class="icon button" @click="logout">
|
2020-12-07 15:07:13 +00:00
|
|
|
<i class="material-icons">exit_to_app</i>
|
2020-03-05 01:18:10 +00:00
|
|
|
<span>{{ $t("logout") }}</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2021-06-14 04:07:30 +00:00
|
|
|
<script lang="ts">
|
|
|
|
|
import Vue from "vue"
|
|
|
|
|
import { signOutUser } from "~/helpers/fb/auth"
|
2020-03-05 01:18:10 +00:00
|
|
|
|
2021-06-14 04:07:30 +00:00
|
|
|
export default Vue.extend({
|
2020-03-05 01:18:10 +00:00
|
|
|
methods: {
|
2020-10-17 09:23:19 +00:00
|
|
|
async logout() {
|
|
|
|
|
try {
|
2021-06-14 04:07:30 +00:00
|
|
|
await signOutUser()
|
2020-10-17 09:23:19 +00:00
|
|
|
|
2021-06-14 04:07:30 +00:00
|
|
|
this.$toast.info(this.$t("logged_out").toString(), {
|
2020-10-17 09:23:19 +00:00
|
|
|
icon: "vpn_key",
|
|
|
|
|
})
|
|
|
|
|
} catch (err) {
|
|
|
|
|
this.$toast.show(err.message || err, {
|
|
|
|
|
icon: "error",
|
2020-03-05 01:18:10 +00:00
|
|
|
})
|
2020-10-17 09:23:19 +00:00
|
|
|
}
|
2020-03-05 01:18:10 +00:00
|
|
|
},
|
|
|
|
|
},
|
2021-06-14 04:07:30 +00:00
|
|
|
})
|
2020-03-05 01:18:10 +00:00
|
|
|
</script>
|