gnunet-svn
[Top][All Lists]
Advanced

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

[reclaim-ui] 406/459: allow authorization from edit component


From: gnunet
Subject: [reclaim-ui] 406/459: allow authorization from edit component
Date: Fri, 11 Jun 2021 23:28:18 +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 d60ba56630eb1503dad692d77af0774a6fa1ad88
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Tue Jan 5 17:45:00 2021 +0900

    allow authorization from edit component
---
 src/app/edit-identity/edit-identity.component.html | 7 +++++++
 src/app/edit-identity/edit-identity.component.ts   | 9 +++++++++
 src/app/identity-list/identity-list.component.ts   | 4 +---
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/app/edit-identity/edit-identity.component.html 
b/src/app/edit-identity/edit-identity.component.html
index af14dca..bc770e5 100644
--- a/src/app/edit-identity/edit-identity.component.html
+++ b/src/app/edit-identity/edit-identity.component.html
@@ -296,6 +296,13 @@
       <button class="btn btn-primary" (click)="goBack()">
         <span class="fa fa-arrow-left"></span> {{ getMessage("Back") }}
       </button>
+      <button *ngIf="oidcService.inOpenIdFlow()" 
[disabled]="!isClientVerified()" (click)="loginIdentity(identity)"
+        class="btn btn-primary mr-1 openid-login">
+        <span *ngIf="isClientVerified()">{{ 
getMessage("identity_list_html@shareInfo1") }} <i
+            class="fa fa-share-alt text-primary"></i> {{ 
getMessage("identity_list_html@shareInfo2") }}</span>
+        <span *ngIf="!isClientVerified()"><i class="fa 
fa-exclamation-circle"></i>
+          {{ getMessage("identity_list_html@sharingDisabled") }}</span>
+      </button>
       <button *ngIf="!inOpenIdFlow()" class="btn btn-primary" 
[routerLink]="['/edit-authorizations', identity.name]" [style.float]="'right'">
         <span class="fab fa-openid"></span>
         {{ getMessage("edit_identity_html@manageAuths") }}
diff --git a/src/app/edit-identity/edit-identity.component.ts 
b/src/app/edit-identity/edit-identity.component.ts
index d9e011a..4ad252d 100644
--- a/src/app/edit-identity/edit-identity.component.ts
+++ b/src/app/edit-identity/edit-identity.component.ts
@@ -893,4 +893,13 @@ export class EditIdentityComponent implements OnInit {
       }
     }
   }
+
+  loginIdentity(identity) {
+    this.oidcService.login(identity).subscribe(() => {
+      console.log('Successfully logged in');
+      this.oidcService.authorize();
+    });
   }
+
+  isClientVerified() { return this.oidcService.isClientVerified(); }
+}
diff --git a/src/app/identity-list/identity-list.component.ts 
b/src/app/identity-list/identity-list.component.ts
index b40bfe4..4120592 100644
--- a/src/app/identity-list/identity-list.component.ts
+++ b/src/app/identity-list/identity-list.component.ts
@@ -181,12 +181,10 @@ export class IdentityListComponent implements OnInit {
   loginIdentity(identity) {
     this.oidcService.login(identity).subscribe(() => {
       console.log('Successfully logged in');
-      this.authorize();
+      this.oidcService.authorize();
     });
   }
 
-  authorize() { this.oidcService.authorize(); }
-
   openModal(id: string) {
     this.modalService.open(id);
     this.modalOpened = true;

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