feat: add updating icons to claims

This commit is contained in:
Yarmo Mackenbach 2023-09-25 16:12:20 +02:00
parent 526e69809c
commit 9163b45525
No known key found for this signature in database
GPG key ID: 3C57D093219103A3
3 changed files with 10 additions and 0 deletions

View file

@ -64,6 +64,7 @@ export class Claim extends HTMLElement {
root.querySelector('.info .title').innerText = claimJson.display.name; root.querySelector('.info .title').innerText = claimJson.display.name;
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', `https://design.keyoxide.org/brands/service-providers/${claimJson.display.serviceProviderName.toLowerCase() || '_'}/icon.svg`);
try { try {
if (claim.status >= 200) { if (claim.status >= 200) {

View file

@ -100,6 +100,14 @@ kx-claim {
color: var(--text-color); color: var(--text-color);
} }
.info img {
width: 16px;
height: 16px;
margin-right: 8px;
vertical-align: sub;
opacity: 0.5;
}
.claim__links { .claim__links {
p { p {

View file

@ -22,6 +22,7 @@ mixin generatePersona(persona, isPrimary)
summary summary
.info .info
p p
img(src=`https://design.keyoxide.org/brands/service-providers/_/icon.svg` onerror="this.src='https://design.keyoxide.org/brands/service-providers/_/icon.svg'")
span.title= claim.display.name span.title= claim.display.name
span.subtitle-wrapper span.subtitle-wrapper
| [ | [