mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 14:59:29 -07:00
feat: add updating icons to claims
This commit is contained in:
parent
526e69809c
commit
9163b45525
3 changed files with 10 additions and 0 deletions
|
@ -64,6 +64,7 @@ export class Claim extends HTMLElement {
|
|||
root.querySelector('.info .title').innerText = claimJson.display.name;
|
||||
root.querySelector('.info .subtitle').innerText = claimJson.display.serviceProviderName ??
|
||||
(claim.status < 300 ? '???' : '---');
|
||||
root.querySelector('.info img').setAttribute('src', `https://design.keyoxide.org/brands/service-providers/${claimJson.display.serviceProviderName.toLowerCase() || '_'}/icon.svg`);
|
||||
|
||||
try {
|
||||
if (claim.status >= 200) {
|
||||
|
|
|
@ -100,6 +100,14 @@ kx-claim {
|
|||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.info img {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 8px;
|
||||
vertical-align: sub;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.claim__links {
|
||||
|
||||
p {
|
||||
|
|
|
@ -22,6 +22,7 @@ mixin generatePersona(persona, isPrimary)
|
|||
summary
|
||||
.info
|
||||
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.subtitle-wrapper
|
||||
| [
|
||||
|
|
Loading…
Reference in a new issue