fix: user switcher blocking other dialog (#430)
This commit is contained in:
parent
ebf1bb81b0
commit
61113a242a
|
@ -9,8 +9,8 @@
|
|||
/>
|
||||
</div>
|
||||
|
||||
<template #popper>
|
||||
<UserSwitcher ref="switcher" />
|
||||
<template #popper="{ hide }">
|
||||
<UserSwitcher ref="switcher" @click="hide()" />
|
||||
</template>
|
||||
</VDropdown>
|
||||
<button v-else btn-solid text-sm px-2 py-1 text-center @click="openSigninDialog()">
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<script setup lang="ts">
|
||||
import type { UserLogin } from '~/types'
|
||||
|
||||
const emits = defineEmits<{
|
||||
(event: 'click'): void
|
||||
}>()
|
||||
|
||||
const all = useUsers()
|
||||
|
||||
const sorted = computed(() => {
|
||||
|
@ -20,7 +24,7 @@ const switchUser = (user: UserLogin) => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div sm:min-w-80 max-w-100vw mxa py2 flex="~ col">
|
||||
<div sm:min-w-80 max-w-100vw mxa py2 flex="~ col" @click="emits('click')">
|
||||
<template v-for="user of sorted" :key="user.id">
|
||||
<button
|
||||
flex rounded px4 py3 text-left
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
<button btn-action-icon :aria-label="$t('action.switch_account')">
|
||||
<div i-ri:more-2-line />
|
||||
</button>
|
||||
<template #popper>
|
||||
<UserSwitcher />
|
||||
<template #popper="{ hide }">
|
||||
<UserSwitcher @click="hide" />
|
||||
</template>
|
||||
</VDropdown>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue