From a504e8fd9d702c15ed9a23a54191ad38a49c1388 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Mon, 29 Jun 2020 11:07:23 +0200 Subject: [PATCH] Hide proofs if none present --- assets/scripts.js | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/assets/scripts.js b/assets/scripts.js index 17adcc8..4bccafe 100644 --- a/assets/scripts.js +++ b/assets/scripts.js @@ -213,23 +213,25 @@ async function displayProfile(opts) { feedback += `
${keyData.fingerprint}
`; feedback += ``; - feedback += `
`; - feedback += `
`; - feedback += `
proofs
`; - feedback += `
`; - for (var i = 0; i < verifications.length; i++) { - if (!verifications[i].type) { continue; } - feedback += `
`; - feedback += `
${verifications[i].type}
`; - feedback += `
`; - feedback += `${verifications[i].display}`; - if (verifications[i].isVerified) { - feedback += `verified ✔`; - } else { - feedback += `proof`; + if (verifications.length > 0) { + feedback += `
`; + feedback += `
`; + feedback += `
proofs
`; + feedback += `
`; + for (var i = 0; i < verifications.length; i++) { + if (!verifications[i].type) { continue; } + feedback += `
`; + feedback += `
${verifications[i].type}
`; + feedback += `
`; + feedback += `${verifications[i].display}`; + if (verifications[i].isVerified) { + feedback += `verified ✔`; + } else { + feedback += `proof`; + } + feedback += `
`; + feedback += `
`; } - feedback += `
`; - feedback += `
`; } feedback += `
`;