gnunet-svn
[Top][All Lists]
Advanced

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

[reclaim-ui] 263/459: add spinner when saving


From: gnunet
Subject: [reclaim-ui] 263/459: add spinner when saving
Date: Fri, 11 Jun 2021 23:25:55 +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 7ff4a52ddab16dfc60fd60fe4e0ce3dc5c023056
Author: Martin Schanzenbach <mschanzenbach@posteo.de>
AuthorDate: Thu Aug 6 00:54:28 2020 +0200

    add spinner when saving
---
 src/app/edit-identity/edit-identity.component.html | 4 ++++
 src/app/edit-identity/edit-identity.component.ts   | 6 ++++++
 2 files changed, 10 insertions(+)

diff --git a/src/app/edit-identity/edit-identity.component.html 
b/src/app/edit-identity/edit-identity.component.html
index eb0dada..5120e04 100644
--- a/src/app/edit-identity/edit-identity.component.html
+++ b/src/app/edit-identity/edit-identity.component.html
@@ -1,3 +1,7 @@
+<div *ngIf="actions !== ''" class="alert alert-primary fade show" 
style="position:fixed;top:0; width:100%;z-index:100;">
+  <i class="fa fa-spinner fa-spin" aria-hidden="true"></i> {{actions}}
+</div>
+
 <!-- Identity edit screen -->
 <div class="m-2 card">
   <div class="card-avatar card-img-top">
diff --git a/src/app/edit-identity/edit-identity.component.ts 
b/src/app/edit-identity/edit-identity.component.ts
index 4cf9706..0bfbc3b 100644
--- a/src/app/edit-identity/edit-identity.component.ts
+++ b/src/app/edit-identity/edit-identity.component.ts
@@ -45,6 +45,7 @@ export class EditIdentityComponent implements OnInit {
   missingAddressClaims: Attribute[];
   existingNonStandardClaims: Attribute[];
   missingNonStandardClaims: Attribute[];
+  actions: string;
 
   constructor(private reclaimService: ReclaimService,
               private identityService: IdentityService,
@@ -56,6 +57,7 @@ export class EditIdentityComponent implements OnInit {
               private router: Router,) {}
 
   ngOnInit() {
+    this.actions = '';
     this.attributes = [];
     this.attestations = [];
     this.optionalClaims = [];
@@ -257,6 +259,7 @@ export class EditIdentityComponent implements OnInit {
        */
       this.newAttribute.attestation = '';
     }
+    this.actions = "Saving...";
     this.storeAttributes()
       .pipe(
         finalize(() => {
@@ -268,6 +271,7 @@ export class EditIdentityComponent implements OnInit {
         }))
       .subscribe(res => {
         //FIXME success dialog/banner
+        this.actions = "";
         this.updateAttributes();
         this.router.navigate(['/']);
       },
@@ -342,6 +346,7 @@ export class EditIdentityComponent implements OnInit {
    * Adds a new attribute, stores all changes and STAYS on this page.
    */
   addAttribute() {
+    this.actions = "Saving..."
     this.storeAttributes()
       .pipe(
         finalize(() => {
@@ -352,6 +357,7 @@ export class EditIdentityComponent implements OnInit {
           this.updateAttributes();
         }))
       .subscribe(res => {
+        this.actions = '';
         console.log(res);
       },
       err => {

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