feat(page): hide email of people in a course (#123)

This commit is contained in:
Dunsin
2023-12-24 11:09:22 +01:00
committed by GitHub
parent 0f8f1c98d8
commit 797c77868f
@@ -91,6 +91,13 @@
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) {
shouldEditMemberId = personId;
}
@@ -194,7 +201,7 @@
{person.profile.fullname}
</p>
<p class="text-xs text-primary-600 line-clamp-1">
{getEmail(person)}
{obscureEmail(getEmail(person))}
</p>
</div>
<div class="flex items-center">