From 5748c579478f08276e763f723b89c6f58e36cb59 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Fri, 7 Aug 2020 11:17:05 +0200 Subject: [PATCH] Distinguish primary email address from additional email addresses --- assets/scripts.js | 9 ++++++++- assets/styles.css | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/assets/scripts.js b/assets/scripts.js index 487c072..7174ece 100644 --- a/assets/scripts.js +++ b/assets/scripts.js @@ -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 += `
`; feedback += `
general information
`; feedback += ``; + if (userMail) { + feedback += `
`; + feedback += `
primary email
`; + feedback += ``; + feedback += `
`; + } 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 += `
`; feedback += `
email
`; feedback += ``; diff --git a/assets/styles.css b/assets/styles.css index 89e68af..6637598 100644 --- a/assets/styles.css +++ b/assets/styles.css @@ -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;