gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[reclaim-ui] 74/459: entity name and revoke button fixed


From: gnunet
Subject: [reclaim-ui] 74/459: entity name and revoke button fixed
Date: Fri, 11 Jun 2021 23:22:46 +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 572f83f61f8e06470ddc9344d3d00804741dec65
Author: Alexia Pagkopoulou <a.pagkopoulou@tum.de>
AuthorDate: Wed Jun 5 15:20:15 2019 +0200

    entity name and revoke button fixed
---
 src/app/identity-list/identity-list.component.html | 30 ++++++++++++++++---
 src/app/identity-list/identity-list.component.ts   | 34 ++++++++++++++--------
 2 files changed, 48 insertions(+), 16 deletions(-)

diff --git a/src/app/identity-list/identity-list.component.html 
b/src/app/identity-list/identity-list.component.html
index f34cfc1..20e164a 100644
--- a/src/app/identity-list/identity-list.component.html
+++ b/src/app/identity-list/identity-list.component.html
@@ -91,13 +91,34 @@
     </div>
 
     <div style="margin-top: 1.5em;">
-      <h6 class="card-subtitle mb-2" *ngIf="identityInEdit == 
showTicketsIdentity">Authorized Entities:
-      </h6>
-
       <table class="table pb-1" *ngIf="identityInEdit == showTicketsIdentity">
+        <thead style="border-top-style: hidden">
+          <tr>
+            <th scope="col">
+              <h6 class="card-subtitle mb-2" *ngIf="identityInEdit == 
showTicketsIdentity">
+                Authorized Entities:
+              </h6>
+            </th>
+            <th scope="col">
+              <h6 class="card-subtitle mb-2" *ngIf="identityInEdit == 
showTicketsIdentity">
+                Shared attributes:
+              </h6>
+            </th>
+            <th scope="col"></th>
+          </tr>
+        </thead>
         <tbody>
           <tr *ngFor="let ticket of tickets[identityInEdit.pubkey]">
-            <td><div style="min-width: 
15em">{{identityNameMapper[ticket.audience]}}</div></td>
+            <td>
+              <div style="min-width: 15em">
+                {{identityNameMapper[ticket.audience]}}
+              </div>
+            </td>
+            <td>
+              <div style="min-width: 15em">
+                {{showSharedAttributes(ticket)}}
+              </div>
+            </td>
             <td>
               <button class="btn btn-primary" 
(click)="revokeTicket(identityInEdit, ticket)">
                 <span class="fa fa-unlink"></span> Revoke
@@ -108,6 +129,7 @@
       </table>
     </div>
 
+
     <div>
       <button class="btn btn-primary" 
(click)="saveIdentityAttributes(identityInEdit)" 
[disabled]="!canSaveIdentity(identityInEdit)">
         <span class="fa fa-save"></span> Save and Back
diff --git a/src/app/identity-list/identity-list.component.ts 
b/src/app/identity-list/identity-list.component.ts
index b7941be..96e74ef 100644
--- a/src/app/identity-list/identity-list.component.ts
+++ b/src/app/identity-list/identity-list.component.ts
@@ -219,6 +219,19 @@ export class IdentityListComponent implements OnInit {
     }
   }
 
+  private mapAudience(ticket) 
+  {
+    this.gnsService.getClientName(ticket.audience).subscribe(records => {
+      for (var i = 0; i < records.data.length; i++) {
+        if (records.data[i].record_type !== "RECLAIM_OIDC_CLIENT")
+          continue;
+        this.identityNameMapper[ticket.audience] = records.data[i].value;
+        break;
+      }   
+    },
+      error => console.debug(error.message)); 
+  }
+
   private updateTickets(identity)
   {
     this.reclaimService.getTickets(identity).subscribe(tickets => {
@@ -227,19 +240,10 @@ export class IdentityListComponent implements OnInit {
         return;
       }
       this.tickets[identity.pubkey] = tickets;
-      tickets.forEach((ticket) => {
-        this.gnsService.getClientName(ticket.audience).subscribe(records => {
-          for (var i = 0; i < records.length; i++) {
-            if (records[i].type !== "RECLAIM_OIDC_CLIENT")
-              continue;
-            this.identityNameMapper[ticket.audience] = records[i].value;
-            break;
-          }
-        });
-      });
-    });
+      tickets.forEach(ticket => this.mapAudience(ticket));
+    }); 
   }
-
+  
   toggleShowTickets(identity)
   {
     if (this.showTicketsIdentity == identity) {
@@ -276,6 +280,12 @@ export class IdentityListComponent implements OnInit {
     });
   }
 
+  showSharedAttributes(ticket)
+  {
+    return ["attr1", "attr2"];
+    //TODO 
+  }
+
   saveAttribute(identity, attribute)
   {
     return this.reclaimService.addAttribute(identity, attribute)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]