mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 14:59:29 -07:00
Show message when userIds have identical claims
This commit is contained in:
parent
7066c259c4
commit
698ecb2ab3
1 changed files with 12 additions and 0 deletions
|
@ -357,6 +357,8 @@ async function displayProfile(opts) {
|
|||
return;
|
||||
}
|
||||
|
||||
let primaryClaims
|
||||
|
||||
feedback = "";
|
||||
if (userMail) {
|
||||
verifications.forEach((userId, i) => {
|
||||
|
@ -380,6 +382,8 @@ async function displayProfile(opts) {
|
|||
|
||||
userId = userId.sort((a,b) => (a.serviceproviderData.serviceprovider.name > b.serviceproviderData.serviceprovider.name) ? 1 : ((b.serviceproviderData.serviceprovider.name > a.serviceproviderData.serviceprovider.name) ? -1 : 0));
|
||||
|
||||
primaryClaims = userId
|
||||
|
||||
userId.forEach((claim, i) => {
|
||||
const claimData = claim.serviceproviderData;
|
||||
if (!claimData.serviceprovider.name) {
|
||||
|
@ -423,6 +427,14 @@ async function displayProfile(opts) {
|
|||
|
||||
userId = userId.sort((a,b) => (a.serviceproviderData.serviceprovider.name > b.serviceproviderData.serviceprovider.name) ? 1 : ((b.serviceproviderData.serviceprovider.name > a.serviceproviderData.serviceprovider.name) ? -1 : 0));
|
||||
|
||||
if (primaryClaims && primaryClaims.toString() == userId.toString()) {
|
||||
feedback += `<div class="profileDataItem profileDataItem--noLabel">`;
|
||||
feedback += `<div class="profileDataItem__label"></div>`;
|
||||
feedback += `<div class="profileDataItem__value">Identical to primary</div>`;
|
||||
feedback += `</div>`;
|
||||
return;
|
||||
}
|
||||
|
||||
userId.forEach((claim, i) => {
|
||||
const claimData = claim.serviceproviderData;
|
||||
if (!claimData.serviceprovider.name) {
|
||||
|
|
Loading…
Reference in a new issue