Hide claims without matches

This commit is contained in:
Yarmo Mackenbach 2021-06-03 15:23:08 +02:00
parent 64bcc687ac
commit 84a56c7440
No known key found for this signature in database
GPG key ID: 37367F4AF4087AD1

View file

@ -6,29 +6,30 @@ mixin generateUser(user, isPrimary)
if isPrimary if isPrimary
small.primary primary small.primary primary
each claim in user.claims each claim in user.claims
kx-claim.kx-item(data-claim=claim) if claim.matches.length > 0
details kx-claim.kx-item(data-claim=claim)
summary details
.info summary
p.subtitle= claim.matches[0].serviceprovider.name .info
p.title= claim.matches[0].profile.display p.subtitle= claim.matches[0].serviceprovider.name
.icons p.title= claim.matches[0].profile.display
.verificationStatus(data-value='running') .icons
.inProgress .verificationStatus(data-value='running')
.content .inProgress
.subsection .content
img(src='/static/img/link.png') .subsection
div img(src='/static/img/link.png')
if (claim.matches[0].profile.uri) div
p Profile link: if (claim.matches[0].profile.uri)
a(rel='me' href=claim.matches[0].profile.uri)= claim.matches[0].profile.uri p Profile link:
else a(rel='me' href=claim.matches[0].profile.uri)= claim.matches[0].profile.uri
p Profile link: not accessible from browser else
if (claim.matches[0].proof.uri) p Profile link: not accessible from browser
p Proof link: if (claim.matches[0].proof.uri)
a(rel='me' href=claim.matches[0].proof.uri)= claim.matches[0].proof.uri p Proof link:
else a(rel='me' href=claim.matches[0].proof.uri)= claim.matches[0].proof.uri
p Proof link: not accessible from browser else
p Proof link: not accessible from browser
block js block js
script(type='application/javascript' src='/static/qrcode.min.js' charset='utf-8') script(type='application/javascript' src='/static/qrcode.min.js' charset='utf-8')