elk/components/user/UserDropdown.vue

16 lines
562 B
Vue
Raw Permalink Normal View History

<script setup lang="ts">
const mask = useMask()
</script>
2022-12-27 20:07:19 +00:00
<template>
<VDropdown :distance="0" placement="top-start" strategy="fixed" @apply-show="mask.show()" @apply-hide="mask.hide()">
2022-12-27 20:07:19 +00:00
<button btn-action-icon :aria-label="$t('action.switch_account')">
<div :class="{ 'hidden xl:block': currentUser }" i-ri:more-2-line />
<AccountAvatar v-if="currentUser" xl:hidden :account="currentUser.account" w-9 h-9 square />
2022-12-27 20:07:19 +00:00
</button>
<template #popper="{ hide }">
<UserSwitcher @click="hide" />
</template>
</VDropdown>
</template>