forked from Mirrors/keyoxide-web
Add verification sorting
This commit is contained in:
parent
83901f06a1
commit
60ef35fd79
1 changed files with 8 additions and 0 deletions
|
@ -158,6 +158,10 @@ async function verifyProofs(opts) {
|
|||
verifications.push(await verifyProof(notation[1], keyData.fingerprint));
|
||||
}
|
||||
|
||||
// One-line sorting function (order verifications by type)
|
||||
console.log(keyData.notations);
|
||||
verifications = verifications.sort((a,b) => (a.type > b.type) ? 1 : ((b.type > a.type) ? -1 : 0));
|
||||
|
||||
// Generate feedback
|
||||
feedback += `<p>`;
|
||||
for (var i = 0; i < verifications.length; i++) {
|
||||
|
@ -191,6 +195,10 @@ async function displayProfile(opts) {
|
|||
verifications.push(await verifyProof(notation[1], keyData.fingerprint));
|
||||
}
|
||||
|
||||
// One-line sorting function (order verifications by type)
|
||||
console.log(keyData.notations);
|
||||
verifications = verifications.sort((a,b) => (a.type > b.type) ? 1 : ((b.type > a.type) ? -1 : 0));
|
||||
|
||||
// Generate feedback
|
||||
feedback += `<div class="profileDataItem profileDataItem--separator profileDataItem--noLabel">`;
|
||||
feedback += `<div class="profileDataItem__label"></div>`;
|
||||
|
|
Loading…
Reference in a new issue