feat(page): hide email of people in a course (#123)
This commit is contained in:
@@ -91,6 +91,13 @@
|
|||||||
return profile ? profile.email : email;
|
return profile ? profile.email : email;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function obscureEmail(email) {
|
||||||
|
const [username, domain] = email.split('@');
|
||||||
|
const obscuredUsername = username.charAt(0) + '*'.repeat(username.length - 2) + username.charAt(username.length - 1);
|
||||||
|
|
||||||
|
return `${obscuredUsername}@${domain}`;
|
||||||
|
}
|
||||||
|
|
||||||
function handleEditStudentIdMode(personId: string) {
|
function handleEditStudentIdMode(personId: string) {
|
||||||
shouldEditMemberId = personId;
|
shouldEditMemberId = personId;
|
||||||
}
|
}
|
||||||
@@ -194,7 +201,7 @@
|
|||||||
{person.profile.fullname}
|
{person.profile.fullname}
|
||||||
</p>
|
</p>
|
||||||
<p class="text-xs text-primary-600 line-clamp-1">
|
<p class="text-xs text-primary-600 line-clamp-1">
|
||||||
{getEmail(person)}
|
{obscureEmail(getEmail(person))}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
|
|||||||
Reference in New Issue
Block a user