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