-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjusted the active user indicator removing self and adding blinking …
…animation
- Loading branch information
Showing
3 changed files
with
81 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<template> | ||
<div | ||
v-if="otherUsers.length > 0" | ||
class="d-flex flex-row gap-1 align-items-center rounded bg-white border border-1 border-primary p-1 px-2" | ||
> | ||
<DotIndicator | ||
class="blink" | ||
type="primary" | ||
style="width: 0.6rem;" | ||
/> | ||
|
||
<div class="d-flex align-items-center avatar-list ps-2"> | ||
<a | ||
v-for="user in otherUsers" | ||
:key="user.id" | ||
href="#" | ||
class="avatar-list-item d-flex align-items-center text-decoration-none" | ||
@click.prevent="showUserInfo(user)" | ||
> | ||
<user-avatar | ||
:user="user" | ||
:size="20" | ||
class="align-middle" | ||
/> | ||
</a> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { | ||
showUserInfo, | ||
} from '@/helpers/modal.js'; | ||
import { computed } from 'vue'; | ||
import useUserStore from '@/bootstrap/stores/user.js'; | ||
import DotIndicator from '@/components/indicators/DotIndicator.vue'; | ||
import UserAvatar from '@/components/UserAvatar.vue'; | ||
export default { | ||
components: { | ||
DotIndicator, | ||
UserAvatar, | ||
}, | ||
props: { | ||
activeUsers: { | ||
required: true, | ||
type: Array, | ||
}, | ||
}, | ||
setup(props) { | ||
const userStore = useUserStore(); | ||
const otherUsers = computed(() => { | ||
return props.activeUsers.filter(user => user.id !== userStore.getCurrentUserId); | ||
}); | ||
return { | ||
otherUsers, | ||
showUserInfo, | ||
}; | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters