mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 14:59:29 -07:00
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