Distinguish primary email address from additional email addresses

This commit is contained in:
Yarmo Mackenbach 2020-08-07 11:17:05 +02:00
parent 65858f0c0c
commit 5748c57947
2 changed files with 10 additions and 1 deletions

View file

@ -235,6 +235,7 @@ async function displayProfile(opts) {
}
let userData = keyData.user.user.userId;
let userName = userData.name ? userData.name : userData.email;
let userMail = userData.email ? userData.email : null;
// Determine WKD or HKP link
switch (opts.mode) {
@ -290,8 +291,14 @@ async function displayProfile(opts) {
feedback += `<div class="profileDataItem__label"></div>`;
feedback += `<div class="profileDataItem__value">general information</div>`;
feedback += `</div>`;
if (userMail) {
feedback += `<div class="profileDataItem">`;
feedback += `<div class="profileDataItem__label">primary email</div>`;
feedback += `<div class="profileDataItem__value"><a href="mailto:${userMail}">${userMail}</a></div>`;
feedback += `</div>`;
}
for (var i = 0; i < keyData.publicKey.users.length; i++) {
if (keyData.publicKey.users[i].userId && 'email' in keyData.publicKey.users[i].userId && keyData.publicKey.users[i].userId.email && keyData.publicKey.users[i].revocationSignatures.length == 0) {
if (keyData.publicKey.users[i].userId && 'email' in keyData.publicKey.users[i].userId && keyData.publicKey.users[i].userId.email && keyData.publicKey.users[i].revocationSignatures.length == 0 && keyData.publicKey.users[i].userId.email != userMail) {
feedback += `<div class="profileDataItem">`;
feedback += `<div class="profileDataItem__label">email</div>`;
feedback += `<div class="profileDataItem__value"><a href="mailto:${keyData.publicKey.users[i].userId.email}">${keyData.publicKey.users[i].userId.email}</a></div>`;

View file

@ -273,6 +273,8 @@ select {
min-height: 32px;
padding: 0 8px;
max-width: 20%;
font-size: 0.9em;
line-height: 1.6em;
color: #777;
text-align: right;
white-space: nowrap;