2022-12-19 16:44:14 +01:00
|
|
|
<script setup lang="ts">
|
|
|
|
const all = useUsers()
|
2022-12-20 16:56:54 +01:00
|
|
|
const masto = useMasto()
|
2022-12-19 16:44:14 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-12-27 21:07:19 +01:00
|
|
|
<div flex justify-start items-end px-2 gap-5>
|
|
|
|
<div flex="~ wrap-reverse" gap-5>
|
|
|
|
<template v-for="user of all" :key="user.id">
|
|
|
|
<button
|
|
|
|
flex rounded
|
|
|
|
cursor-pointer
|
|
|
|
aria-label="Switch user"
|
2023-01-03 01:11:10 +01:00
|
|
|
:class="user.account?.id === currentUser?.account?.id ? '' : 'op25 grayscale'"
|
2022-12-27 21:07:19 +01:00
|
|
|
hover="filter-none op100"
|
2023-01-03 03:14:54 +01:00
|
|
|
@click="switchUser(user, masto)"
|
2022-12-27 21:07:19 +01:00
|
|
|
>
|
2023-01-03 02:23:16 +01:00
|
|
|
<AccountAvatar v-if="!user.guest" w-13 h-13 :account="user.account" />
|
2023-01-03 10:39:00 +01:00
|
|
|
<div v-else bg="gray/40" rounded-full w-13 h-13 flex shrink-0 items-center justify-center text-5>
|
|
|
|
G
|
|
|
|
</div>
|
2022-12-27 21:07:19 +01:00
|
|
|
</button>
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
<div flex items-center justify-center w-13 h-13>
|
|
|
|
<UserDropdown />
|
|
|
|
</div>
|
2022-12-19 16:44:14 +01:00
|
|
|
</div>
|
|
|
|
</template>
|