[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[reclaim-ui] 284/459: attested values
From: |
gnunet |
Subject: |
[reclaim-ui] 284/459: attested values |
Date: |
Fri, 11 Jun 2021 23:26:16 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository reclaim-ui.
commit 7dfc711c40d670266329117cae25cf8610fcc759
Author: Martin Schanzenbach <mschanzenbach@posteo.de>
AuthorDate: Fri Aug 7 20:25:04 2020 +0200
attested values
---
src/app/identity-list/identity-list.component.html | 4 ++--
src/app/identity-list/identity-list.component.ts | 19 +++++++++++++++++++
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/src/app/identity-list/identity-list.component.html
b/src/app/identity-list/identity-list.component.html
index 426f173..61c000a 100644
--- a/src/app/identity-list/identity-list.component.html
+++ b/src/app/identity-list/identity-list.component.html
@@ -112,8 +112,8 @@
</div>
</td>
<td>
- <div *ngIf="attribute.value.length <= 20" style="min-width:
15em">{{attribute.value}}</div>
- <div *ngIf="attribute.value.length > 20" style="min-width:
15em">{{attribute.value.substring(0, 15)}}<span
style="color:#eee">[...]</span></div>
+ <div *ngIf="getAttributeValue(attribute).length <= 20"
style="min-width: 15em">{{getAttributeValue(attribute)}}</div>
+ <div *ngIf="getAttributeValue(attribute).length > 20"
style="min-width: 15em">{{getAttributeValue(attribute).substring(0, 15)}}<span
style="color:#eee">[...]</span></div>
</td>
</tr>
<tr *ngIf="(openIdentity != identity) &&
hasLotsOfAttributes(identity)">
diff --git a/src/app/identity-list/identity-list.component.ts
b/src/app/identity-list/identity-list.component.ts
index 2ea6e97..8793cd2 100644
--- a/src/app/identity-list/identity-list.component.ts
+++ b/src/app/identity-list/identity-list.component.ts
@@ -428,6 +428,25 @@ export class IdentityListComponent implements OnInit {
return false;
}
+ isClaimAttested(attribute: Attribute): boolean {
+ return attribute.flag === '1';
+ }
+
+ getAttributeValue(identity: Identity, attribute: Attribute): string {
+ if (!this.isClaimAttested(attribute)) { return attribute.value };
+ if (undefined === this.attestations[identity.pubkey]) { return '?'};
+ for (let attest of this.attestations[identity.pubkey]) {
+ if (attest.id == attribute.attestation) {
+ for (let attr of attest.attributes) {
+ if (attribute.value == attr.name) {
+ return attr.value;
+ }
+ }
+ }
+ }
+ return "?";
+ }
+
isAttestation(attribute: Attribute) {
if (attribute.flag === '1') {
return true;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [reclaim-ui] 279/459: fix, (continued)
- [reclaim-ui] 279/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 298/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 280/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 277/459: fix style, gnunet, 2021/06/11
- [reclaim-ui] 283/459: fix claim display; better style, gnunet, 2021/06/11
- [reclaim-ui] 286/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 323/459: small fix, gnunet, 2021/06/11
- [reclaim-ui] 285/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 317/459: add englisch message.json file, gnunet, 2021/06/11
- [reclaim-ui] 288/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 284/459: attested values,
gnunet <=
- [reclaim-ui] 289/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 325/459: Merge branch 'i18n' into 'master', gnunet, 2021/06/11
- [reclaim-ui] 324/459: Merge branch 'master' into 'i18n', gnunet, 2021/06/11
- [reclaim-ui] 322/459: Merge branch 'i18n' into 'master', gnunet, 2021/06/11
- [reclaim-ui] 290/459: move info alert, gnunet, 2021/06/11
- [reclaim-ui] 314/459: start i18n, gnunet, 2021/06/11
- [reclaim-ui] 328/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 295/459: better responsiveness, gnunet, 2021/06/11
- [reclaim-ui] 330/459: replace service, gnunet, 2021/06/11
- [reclaim-ui] 318/459: remove all i18n, gnunet, 2021/06/11