1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-11-05 08:27:01 +00:00
bramw_baserow/premium/web-frontend/modules/baserow_premium/components/sidebar/Impersonate.vue
2024-07-31 13:41:49 +00:00

45 lines
952 B
Vue

<template>
<div class="sidebar__impersonate">
<div v-if="impersonating" class="impersonate-warning">
{{ $t('premiumTopSidebar.impersonateDescription') }}
<div>
<Button
class="margin-top-1"
type="danger"
tag="a"
size="small"
:href="resolveAdminUsersHref()"
:loading="loading"
:disabled="loading"
@click="loading = true"
>{{ $t('premiumTopSidebar.impersonateStop') }}</Button
>
</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
name: 'Impersonate',
data() {
return {
loading: false,
}
},
computed: {
...mapGetters({
impersonating: 'impersonating/getImpersonating',
}),
},
methods: {
resolveAdminUsersHref() {
const props = this.$nuxt.$router.resolve({ name: 'admin-users' })
return props.href
},
},
}
</script>