debian-mirror-gitlab/app/assets/javascripts/vue_shared/components/members/utils.js
2021-01-03 14:25:43 +05:30

19 lines
359 B
JavaScript

import { __ } from '~/locale';
export const generateBadges = (member, isCurrentUser) => [
{
show: isCurrentUser,
text: __("It's you"),
variant: 'success',
},
{
show: member.user?.blocked,
text: __('Blocked'),
variant: 'danger',
},
{
show: member.user?.twoFactorEnabled,
text: __('2FA'),
variant: 'info',
},
];