gnunet-svn
[Top][All Lists]
Advanced

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

[reclaim-ui] 22/459: changes


From: gnunet
Subject: [reclaim-ui] 22/459: changes
Date: Fri, 11 Jun 2021 23:21:54 +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 e5383fa175951d435bbed8c922ce1f76f08a52ec
Author: Schanzenbach, Martin <mschanzenbach@posteo.de>
AuthorDate: Thu Mar 7 08:16:39 2019 +0100

    changes
---
 src/app/identity-list/identity-list.component.ts | 65 ++++++++++++++----------
 src/assets/config.json                           |  2 +-
 2 files changed, 38 insertions(+), 29 deletions(-)

diff --git a/src/app/identity-list/identity-list.component.ts 
b/src/app/identity-list/identity-list.component.ts
index e9ca795..4736b1c 100644
--- a/src/app/identity-list/identity-list.component.ts
+++ b/src/app/identity-list/identity-list.component.ts
@@ -49,26 +49,35 @@ export class IdentityListComponent implements OnInit {
     this.newAttribute = new Attribute('', '', 'STRING');
     this.requestedAttributes = {};
     this.missingAttributes = {};
+    this.clientName = "-";
 
     // On opening the options page, fetch stored settings and update the UI 
with them.
     browser.storage.local.get().then(uaSettings => {
       var uaParams = {};
-      var searchStr = <string>uaSettings["search"];
-      var keyVals = searchStr.split("&");
-      for (var i = 0; i < keyVals.length; i++)
-      {
-        uaParams[keyVals[i].split("=")[0]] = keyVals[i].split("=")[1];
+      if (true == <boolean>uaSettings["request"]) {
+        var searchStr = <string>uaSettings["search"];
+        var keyVals = searchStr.split("&");
+        for (var i = 0; i < keyVals.length; i++)
+        {
+          uaParams[keyVals[i].split("=")[0]] = keyVals[i].split("=")[1];
+        }
+        console.log (uaParams);
+        this.oidcService.parseRouteParams(uaParams);
       }
-      console.log (uaParams);
-      this.oidcService.parseRouteParams(uaParams);
+      this.getClientName();
+      //this.newIdentity = new Identity('', '', {});
+      this.identityInEditName = "";
+      this.identityNameMapper = {};
+      this.updateIdentities();
+      console.log("processed localstorage");
     });
-    browser.storage.onChanged.addListener(this.handleStorageChange);
-    //this.oidcService.parseRouteParams(this.route.snapshot.queryParams);
     this.getClientName();
     //this.newIdentity = new Identity('', '', {});
     this.identityInEditName = "";
     this.identityNameMapper = {};
     this.updateIdentities();
+    console.log("processed nginit");
+    //browser.storage.onChanged.addListener(this.handleStorageChange);
   }
 
   handleStorageChange(uaSettings, areaName) : void {
@@ -76,13 +85,13 @@ export class IdentityListComponent implements OnInit {
     browser.storage.local.get().then(uaSettings => {
       var uaParams = {};
       var searchStr = <string>uaSettings["search"];
-        var keyVals = searchStr.split("&");
-        for (var i = 0; i < keyVals.length; i++)
-        {
-          uaParams[keyVals[i].split("=")[0]] = keyVals[i].split("=")[1];
-        }
-        console.log (uaParams);
-        this.oidcService.parseRouteParams(uaParams);
+      var keyVals = searchStr.split("&");
+      for (var i = 0; i < keyVals.length; i++)
+      {
+        uaParams[keyVals[i].split("=")[0]] = keyVals[i].split("=")[1];
+      }
+      console.log (uaParams);
+      this.oidcService.parseRouteParams(uaParams);
     });
   }
 
@@ -147,7 +156,7 @@ export class IdentityListComponent implements OnInit {
 
   addIdentity() {
     this.newIdentity = new Identity ('','');
-}
+  }
 
   editIdentity(identity) {
     this.identityInEdit = identity;
@@ -160,15 +169,15 @@ export class IdentityListComponent implements OnInit {
 
   saveIdentityAttributes(identity) {
     this.storeAttributes(identity)
-    .finally(() => this.updateAttributes(identity))
-    .subscribe(
-      res => console.log(res),
-      error => {return Observable.empty()},
-      () => {
-        this.identityInEdit = null;
-        this.updateAttributes(identity);
-      }
-    );
+      .finally(() => this.updateAttributes(identity))
+      .subscribe(
+        res => console.log(res),
+        error => {return Observable.empty()},
+        () => {
+          this.identityInEdit = null;
+          this.updateAttributes(identity);
+        }
+      );
     this.newAttribute.name = '';
     this.newAttribute.value = '';
     this.newAttribute.type = "STRING";
@@ -255,7 +264,7 @@ export class IdentityListComponent implements OnInit {
 
   saveAttribute(identity, attribute) {
     return this.reclaimService.addAttribute(identity, attribute).subscribe 
(data => {
-        this.updateAttributes(identity);
+      this.updateAttributes(identity);
     });
   }
 
@@ -273,7 +282,7 @@ export class IdentityListComponent implements OnInit {
     }
     if (this.newAttribute.value !== "") {
       promises.push(this.saveAttribute(identity, this.newAttribute));
-      }
+    }
     return Observable.forkJoin(promises)
   }
 
diff --git a/src/assets/config.json b/src/assets/config.json
index d8dc2d0..c46d4fa 100644
--- a/src/assets/config.json
+++ b/src/assets/config.json
@@ -1,3 +1,3 @@
 {
-    "apiUrl": "https://api.reclaim";
+    "apiUrl": "http://localhost:7776";
 }

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