mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 14:59:29 -07:00
fix: references to display object
This commit is contained in:
parent
f137c6aa4c
commit
91244b992b
1 changed files with 5 additions and 5 deletions
|
@ -61,7 +61,7 @@ export class Claim extends HTMLElement {
|
||||||
const claimJson = JSON.parse(value);
|
const claimJson = JSON.parse(value);
|
||||||
const claim = doipjs.Claim.fromJSON(claimJson);
|
const claim = doipjs.Claim.fromJSON(claimJson);
|
||||||
|
|
||||||
root.querySelector('.info .title').innerText = claimJson.display.name;
|
root.querySelector('.info .title').innerText = claimJson.display.profileName;
|
||||||
root.querySelector('.info .subtitle').innerText = claimJson.display.serviceProviderName ??
|
root.querySelector('.info .subtitle').innerText = claimJson.display.serviceProviderName ??
|
||||||
(claim.status < 300 ? '???' : '---');
|
(claim.status < 300 ? '???' : '---');
|
||||||
root.querySelector('.info img').setAttribute('src',
|
root.querySelector('.info img').setAttribute('src',
|
||||||
|
@ -108,15 +108,15 @@ export class Claim extends HTMLElement {
|
||||||
const subsection_links_text = subsection_links.appendChild(document.createElement('div'));
|
const subsection_links_text = subsection_links.appendChild(document.createElement('div'));
|
||||||
|
|
||||||
const profile_link = subsection_links_text.appendChild(document.createElement('p'));
|
const profile_link = subsection_links_text.appendChild(document.createElement('p'));
|
||||||
if (claim.matches[0].profile.uri) {
|
if (claimJson.display.profileUri) {
|
||||||
profile_link.innerHTML = `Profile link: <a rel="me" href="${claim.matches[0].profile.uri}" aria-label="link to profile">${claim.matches[0].profile.uri}</a>`;
|
profile_link.innerHTML = `Profile link: <a rel="me" href="${claimJson.display.profileUri}" aria-label="link to profile">${claimJson.display.profileUri}</a>`;
|
||||||
} else {
|
} else {
|
||||||
profile_link.innerHTML = `Profile link: not accessible from browser`;
|
profile_link.innerHTML = `Profile link: not accessible from browser`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const proof_link = subsection_links_text.appendChild(document.createElement('p'));
|
const proof_link = subsection_links_text.appendChild(document.createElement('p'));
|
||||||
if (claim.matches[0].proof.request.uri) {
|
if (claimJson.display.proofUrl) {
|
||||||
proof_link.innerHTML = `Proof link: <a href="${claim.matches[0].proof.request.uri}" aria-label="link to profile">${claim.matches[0].proof.request.uri}</a>`;
|
proof_link.innerHTML = `Proof link: <a href="${claimJson.display.proofUrl}" aria-label="link to profile">${claimJson.display.proofUrl}</a>`;
|
||||||
} else {
|
} else {
|
||||||
proof_link.innerHTML = `Proof link: not accessible from browser`;
|
proof_link.innerHTML = `Proof link: not accessible from browser`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue