2023-01-03 04:23:16 +03:00
|
|
|
<script setup lang="ts">
|
|
|
|
// workaround: cannot use TSNonNull `!` in template
|
|
|
|
const account = $computed(() => currentUser.value!.account!)
|
|
|
|
</script>
|
|
|
|
|
2022-12-27 23:07:19 +03:00
|
|
|
<template>
|
|
|
|
<VDropdown :distance="0" placement="top-start">
|
|
|
|
<button btn-action-icon :aria-label="$t('action.switch_account')">
|
2023-01-03 16:48:13 +03:00
|
|
|
<div :class="{ 'hidden xl:block': currentUser }" i-ri:more-2-line />
|
2023-01-03 04:23:16 +03:00
|
|
|
<AccountAvatar v-if="!isGuest" xl:hidden :account="account" w-9 h-9 />
|
|
|
|
<span v-else>TODO: Guest</span>
|
2022-12-27 23:07:19 +03:00
|
|
|
</button>
|
|
|
|
<template #popper="{ hide }">
|
|
|
|
<UserSwitcher @click="hide" />
|
|
|
|
</template>
|
|
|
|
</VDropdown>
|
|
|
|
</template>
|