mirror of
https://github.com/elk-zone/elk
synced 2024-11-27 14:28:10 +09:00
feat: add tooltip for user picker (#938)
This commit is contained in:
parent
4e0777d723
commit
25223d026b
@ -17,16 +17,27 @@ const switchUser = (user: UserLogin) => {
|
|||||||
<div flex justify-start items-end px-2 gap-5>
|
<div flex justify-start items-end px-2 gap-5>
|
||||||
<div flex="~ wrap-reverse" gap-5>
|
<div flex="~ wrap-reverse" gap-5>
|
||||||
<template v-for="user of all" :key="user.id">
|
<template v-for="user of all" :key="user.id">
|
||||||
<button
|
<CommonTooltip :distance="8" :delay="{ show: 300, hide: 100 }">
|
||||||
flex rounded
|
<button
|
||||||
cursor-pointer
|
flex rounded
|
||||||
aria-label="Switch user"
|
cursor-pointer
|
||||||
:class="user.account.id === currentUser?.account.id ? '' : 'op25 grayscale'"
|
aria-label="Switch user"
|
||||||
hover="filter-none op100"
|
:class="user.account.id === currentUser?.account.id ? '' : 'op25 grayscale'"
|
||||||
@click="switchUser(user)"
|
hover="filter-none op100"
|
||||||
>
|
@click="switchUser(user)"
|
||||||
<AccountAvatar w-13 h-13 :account="user.account" square />
|
>
|
||||||
</button>
|
<AccountAvatar w-13 h-13 :account="user.account" square />
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<template #popper>
|
||||||
|
<div text-center>
|
||||||
|
<span text-4>
|
||||||
|
<AccountDisplayName :account="user.account" />
|
||||||
|
</span>
|
||||||
|
<AccountHandle :account="user.account" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</CommonTooltip>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div flex items-center justify-center w-13 h-13>
|
<div flex items-center justify-center w-13 h-13>
|
||||||
|
Loading…
Reference in New Issue
Block a user