debian-mirror-gitlab/app/assets/javascripts/members/components/table/member_avatar.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
899 B
Vue
Raw Normal View History

2021-01-03 14:25:43 +05:30
<script>
import { kebabCase } from 'lodash';
import GroupAvatar from '../avatars/group_avatar.vue';
2021-03-11 19:13:27 +05:30
import InviteAvatar from '../avatars/invite_avatar.vue';
import UserAvatar from '../avatars/user_avatar.vue';
2021-01-03 14:25:43 +05:30
export default {
name: 'MemberAvatar',
2022-08-13 15:12:31 +05:30
components: {
UserAvatar,
InviteAvatar,
GroupAvatar,
AccessRequestAvatar: UserAvatar,
BannedAvatar: UserAvatar,
},
2021-01-03 14:25:43 +05:30
props: {
memberType: {
type: String,
required: true,
},
isCurrentUser: {
type: Boolean,
required: true,
},
member: {
type: Object,
required: true,
},
},
computed: {
avatarComponent() {
// eslint-disable-next-line @gitlab/require-i18n-strings
return `${kebabCase(this.memberType)}-avatar`;
},
},
};
</script>
<template>
<component :is="avatarComponent" :member="member" :is-current-user="isCurrentUser" />
</template>