gnunet-svn
[Top][All Lists]
Advanced

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

[reclaim-ui] 188/459: add expiration


From: gnunet
Subject: [reclaim-ui] 188/459: add expiration
Date: Fri, 11 Jun 2021 23:24:40 +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 05cb0f4a5dbe733e0ca8d3901bcac83c601e62a5
Author: Schanzenbach, Martin <mschanzenbach@posteo.de>
AuthorDate: Fri Feb 7 21:15:41 2020 +0100

    add expiration
---
 src/app/attestation.ts                                     | 1 +
 src/app/edit-attestations/edit-attestations.component.html | 4 ++--
 src/app/edit-attestations/edit-attestations.component.ts   | 7 ++++++-
 src/app/edit-identity/edit-identity.component.html         | 4 ++--
 4 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/app/attestation.ts b/src/app/attestation.ts
index a512c83..dfc40ff 100644
--- a/src/app/attestation.ts
+++ b/src/app/attestation.ts
@@ -6,5 +6,6 @@ export class Attestation {
               public value: string,
               public type: string,
               public issuer: string,
+              public expiration: number,
               public attributes: Attribute[]) {}
 }
diff --git a/src/app/edit-attestations/edit-attestations.component.html 
b/src/app/edit-attestations/edit-attestations.component.html
index 075faad..d96ec35 100644
--- a/src/app/edit-attestations/edit-attestations.component.html
+++ b/src/app/edit-attestations/edit-attestations.component.html
@@ -13,7 +13,7 @@
         <tr>
           <th>Name</th>
           <th>Type</th>
-          <th>Value</th>
+          <th>Expires</th>
           <!--<th>Issuer</th>-->
           <th>Issuer</th>
         </tr>
@@ -25,7 +25,7 @@
             <div>{{attestation.type}}</div>
           </td>
           <td>
-            <input placeholder="Attestation Value" 
[(ngModel)]="attestation.value">
+            <div>{{getExpiration(attestation)}}</div>
           </td>
 <!--ISSUER          <td>
             <div style="min-width: 15em">
diff --git a/src/app/edit-attestations/edit-attestations.component.ts 
b/src/app/edit-attestations/edit-attestations.component.ts
index 85116be..bb38606 100644
--- a/src/app/edit-attestations/edit-attestations.component.ts
+++ b/src/app/edit-attestations/edit-attestations.component.ts
@@ -24,7 +24,7 @@ export class EditAttestationsComponent implements OnInit {
               private router: Router) { }
 
   ngOnInit() {
-    this.newAttestation = new Attestation('', '', '', '', '', []);
+    this.newAttestation = new Attestation('', '', '', '', '', 0, []);
     this.identity = new Identity('','');
     this.attestations = [];
     this.activatedRoute.params.subscribe(p => {
@@ -189,6 +189,11 @@ export class EditAttestationsComponent implements OnInit {
     return true;
   }
 
+  getExpiration(attestation: Attestation) {
+    var exp = new Date();
+    exp.setMilliseconds(attestation.expiration / 1000);
+    return exp.toLocaleString();
+  }
 
   //FIXME
   isAttestationValid(attestation: Attestation) {
diff --git a/src/app/edit-identity/edit-identity.component.html 
b/src/app/edit-identity/edit-identity.component.html
index 13609b5..8fb500b 100644
--- a/src/app/edit-identity/edit-identity.component.html
+++ b/src/app/edit-identity/edit-identity.component.html
@@ -92,14 +92,14 @@
             </td>
             <td>
               <select (change)="newAttested.attestation=$event.target.value; ">
-                <option value="">Attestation</option>
+                <option value="">(-)</option>
                 <option *ngFor="let attest of attestations" 
value={{attest.id}}>
                 {{attest.name}}
                 </option>
               </select>
 
               <select *ngIf="newAttested.attestation !== ''" 
(change)="newAttested.value=$event.target.value">
-                <option value="">Source</option>
+                <option value="">(-)</option>
                 <option *ngFor="let claim of 
attestationValuesForAttested(newAttested)" value={{claim.name}}>
                   {{claim.name}}
                 </option>

-- 
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]