[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[reclaim-ui] 301/459: more fixes
From: |
gnunet |
Subject: |
[reclaim-ui] 301/459: more fixes |
Date: |
Fri, 11 Jun 2021 23:26:33 +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 01d47c63de601ec9ebb30550f8b2364fa9474e57
Author: Martin Schanzenbach <mschanzenbach@posteo.de>
AuthorDate: Thu Aug 13 16:56:02 2020 +0200
more fixes
---
src/app/identity-list/identity-list.component.html | 2 +-
src/app/identity-list/identity-list.component.ts | 43 +++-------------------
2 files changed, 7 insertions(+), 38 deletions(-)
diff --git a/src/app/identity-list/identity-list.component.html
b/src/app/identity-list/identity-list.component.html
index 5054975..46f2d08 100644
--- a/src/app/identity-list/identity-list.component.html
+++ b/src/app/identity-list/identity-list.component.html
@@ -88,7 +88,7 @@
<li *ngIf="isEmailRequested() &&
isEmailMissing(identity)">getEmailDescription()</li>
<li *ngIf="isPhoneRequested() &&
isPhoneMissing(identity)">getPhoneDescription()</li>
<li *ngIf="isAddressRequested() &&
isAddressMissing(identity)">getAddressDescription()</li>
- <li *ngFor="let attr of getMissingClaims(identity)">{{attr}}<i
*ngIf="isOptional(attr)"> (optional)</i></li>
+ <li *ngFor="let attr of getMissingClaims(identity)">{{attr.name}}<i
*ngIf="isOptional(attr)"> (optional)</i></li>
</ul>
<button class="btn btn-primary" [routerLink]="['/edit-identity',
identity.name]">
<span class="fa fa-plus"></span> Edit identity
diff --git a/src/app/identity-list/identity-list.component.ts
b/src/app/identity-list/identity-list.component.ts
index 75e09a0..5397243 100644
--- a/src/app/identity-list/identity-list.component.ts
+++ b/src/app/identity-list/identity-list.component.ts
@@ -27,7 +27,6 @@ export class IdentityListComponent implements OnInit {
addressAttributes: any;
requestedScopes: any;
missingClaims: any;
- optionalClaims: any;
attributes: any;
attestations: any;
identities: Identity[];
@@ -56,7 +55,6 @@ export class IdentityListComponent implements OnInit {
this.showConfirmDelete = null;
this.requestedScopes = {};
this.missingClaims = {};
- this.optionalClaims = {};
this.connected = false;
this.modalOpened = false;
if (undefined !== this.route.snapshot.queryParams["code"]) {
@@ -113,25 +111,15 @@ export class IdentityListComponent implements OnInit {
}
}
this.missingClaims[identity.pubkey] = [];
- this.optionalClaims[identity.pubkey] = [];
for (let refscope of refscopes) {
const attested = new Attribute('', '', '', '', 'STRING', '');
- if (refscope[1] === true)
- {
- attested.name = refscope[0];
- this.missingClaims[identity.pubkey].push(attested);
- }
- if (refscope[1] === false)
- {
- attested.name = refscope[0];
- this.optionalClaims[identity.pubkey].push(attested);
- }
+ attested.name = refscope[0];
+ this.missingClaims[identity.pubkey].push(attested);
}
}
private updateAttestations(identity) {
this.attestations[identity.pubkey] = [];
- this.optionalClaims[identity.pubkey] = [];
this.reclaimService.getAttestations(identity).subscribe(attestations => {
if (attestations !== null) {
this.attestations[identity.pubkey] = attestations;
@@ -254,15 +242,10 @@ export class IdentityListComponent implements OnInit {
}
getMissingClaims(identity) {
- const arr = [];
- let i = 0;
if (undefined === this.missingClaims[identity.pubkey]) {
- return arr;
- }
- for (i = 0; i < this.missingClaims[identity.pubkey].length; i++) {
- arr.push(this.missingClaims[identity.pubkey][i].name);
+ return [];
}
- return arr;
+ return this.missingClaims[identity.pubkey];
}
isClaimRequested(identity, attribute) {
@@ -422,7 +405,7 @@ export class IdentityListComponent implements OnInit {
}
if (!found) {
console.log(claim + " is missing");
- return false;
+ return true;
}
}
return false;
@@ -460,21 +443,6 @@ export class IdentityListComponent implements OnInit {
return false; //FIXME actually handle this
https://gitlab.com/voggenre/ui/commit/dd9b6656dee7dbf59809dcc9bc2508ee70d8afe6
}
- getOptionalClaims(identity) {
- const arr = [];
- let i = 0;
- if (!this.inOpenIdFlow()) {
- return [];
- }
- if (undefined === this.optionalClaims[identity.pubkey]) {
- return [];
- }
- for (i = 0; i < this.optionalClaims[identity.pubkey].length; i++) {
- arr.push(this.optionalClaims[identity.pubkey][i].name);
- }
- return arr;
- }
-
isOptional(attr: Attribute): boolean {
if (undefined === attr) { return true };
var claims = this.oidcService.getRequestedClaims();
@@ -486,6 +454,7 @@ export class IdentityListComponent implements OnInit {
}
return true;
}
+
toggleSharingInfo(id: Identity) {
if (this.showSharingInfo === id) {
this.showSharingInfo = '';
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [reclaim-ui] 328/459: fix, (continued)
- [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
- [reclaim-ui] 308/459: style for buttons, gnunet, 2021/06/11
- [reclaim-ui] 339/459: Translated using Weblate (German), gnunet, 2021/06/11
- [reclaim-ui] 302/459: better info, gnunet, 2021/06/11
- [reclaim-ui] 331/459: more i18n, gnunet, 2021/06/11
- [reclaim-ui] 311/459: fix experimental credential selection, gnunet, 2021/06/11
- [reclaim-ui] 341/459: remove template, gnunet, 2021/06/11
- [reclaim-ui] 301/459: more fixes,
gnunet <=
- [reclaim-ui] 293/459: make tables responsive, gnunet, 2021/06/11
- [reclaim-ui] 332/459: copy locale, gnunet, 2021/06/11
- [reclaim-ui] 327/459: new localesService, gnunet, 2021/06/11
- [reclaim-ui] 303/459: fix booleans and function calls, gnunet, 2021/06/11
- [reclaim-ui] 304/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 309/459: fix button hover text, gnunet, 2021/06/11
- [reclaim-ui] 310/459: fix margins, checkboxes, gnunet, 2021/06/11
- [reclaim-ui] 336/459: Translated using Weblate (English), gnunet, 2021/06/11
- [reclaim-ui] 334/459: update, gnunet, 2021/06/11
- [reclaim-ui] 340/459: Translated using Weblate (English), gnunet, 2021/06/11