[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[reclaim-ui] 142/459: fix forjoin bug
From: |
gnunet |
Subject: |
[reclaim-ui] 142/459: fix forjoin bug |
Date: |
Fri, 11 Jun 2021 23:23: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 5804d4e7c218da3fcd5da547189f5def7f35f099
Author: Schanzenbach, Martin <mschanzenbach@posteo.de>
AuthorDate: Fri Jul 19 14:19:42 2019 +0200
fix forjoin bug
---
src/app/identity-list/identity-list.component.html | 4 +--
src/app/identity-list/identity-list.component.ts | 39 +++++++++-------------
2 files changed, 18 insertions(+), 25 deletions(-)
diff --git a/src/app/identity-list/identity-list.component.html
b/src/app/identity-list/identity-list.component.html
index 30a5d1f..ee18d3a 100644
--- a/src/app/identity-list/identity-list.component.html
+++ b/src/app/identity-list/identity-list.component.html
@@ -259,8 +259,8 @@
<div style="min-width: 15em">{{attribute.name}}</div>
</td>
<td>
- <div *ngIf="attribute.value.length <= 10" style="min-width:
15em">{{attribute.value}}</div>
- <div *ngIf="attribute.value.length > 10" style="min-width:
15em">{{attribute.value.substring(0, 10)}}[...]</div>
+ <div *ngIf="attribute.value.length <= 20" style="min-width:
15em">{{attribute.value}}</div>
+ <div *ngIf="attribute.value.length > 20" style="min-width:
15em">{{attribute.value.substring(0, 15)}}<span
style="color:#eee">[...]</span></div>
</td>
<td>
<div style="min-width: 8em; text-align: center;">
diff --git a/src/app/identity-list/identity-list.component.ts
b/src/app/identity-list/identity-list.component.ts
index c4338b1..381dc57 100644
--- a/src/app/identity-list/identity-list.component.ts
+++ b/src/app/identity-list/identity-list.component.ts
@@ -9,8 +9,7 @@ import { NamestoreService } from '../namestore.service';
import { OpenIdService } from '../open-id.service';
import { ReclaimService } from '../reclaim.service';
import { ModalService } from '../modal.service';
-import { finalize } from 'rxjs/operators';
-import { forkJoin, EMPTY } from 'rxjs';
+import { from, forkJoin, EMPTY } from 'rxjs';
@Component({
selector: 'app-identity-list',
@@ -152,18 +151,20 @@ export class IdentityListComponent implements OnInit {
saveIdentityAttributes(identity) {
this.storeAttributes(identity)
- .pipe(
- finalize(() => this.updateAttributes(identity))
- )
- .subscribe(res => console.log(res),
- () => EMPTY, () => {
- this.identityInEdit = null;
- this.updateAttributes(identity);
- });
+ .subscribe(res => {
+ console.log(res)
+ },
+ err => {
+ EMPTY
+ },
+ () => {
+ this.identityInEdit = null;
+ this.updateAttributes(identity);
+ });
this.newAttribute.name = '';
this.newAttribute.value = '';
this.newAttribute.type = 'STRING';
- this.identityInEdit = null;
+ //this.identityInEdit = null;
}
deleteAttribute(attribute) {
@@ -268,11 +269,6 @@ export class IdentityListComponent implements OnInit {
});
}
- saveAttribute(identity, attribute) {
- return this.reclaimService.addAttribute(identity, attribute)
- .subscribe(() => { this.updateAttributes(identity); });
- }
-
private storeAttributes(identity) {
const promises = [];
let i;
@@ -280,15 +276,15 @@ export class IdentityListComponent implements OnInit {
if (this.missingAttributes[identity.pubkey][i].value === '') {
continue;
}
- promises.push(this.saveAttribute(
- identity, this.missingAttributes[identity.pubkey][i]));
+ promises.push(from(this.reclaimService.addAttribute(
+ identity, this.missingAttributes[identity.pubkey][i])));
}
for (i = 0; i < this.attributes[identity.pubkey].length; i++) {
promises.push(
- this.saveAttribute(identity, this.attributes[identity.pubkey][i]));
+ from(this.reclaimService.addAttribute(identity,
this.attributes[identity.pubkey][i])));
}
if (this.newAttribute.value !== '') {
- promises.push(this.saveAttribute(identity, this.newAttribute));
+ promises.push(from(this.reclaimService.addAttribute(identity,
this.newAttribute)));
}
return forkJoin(promises);
@@ -296,9 +292,6 @@ export class IdentityListComponent implements OnInit {
addAttribute() {
this.storeAttributes(this.identityInEdit)
- .pipe(
- finalize(() => this.updateAttributes(this.identityInEdit))
- )
.subscribe(res => console.log(res),
() => EMPTY, () => {
this.newAttribute.name = '';
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [reclaim-ui] 135/459: hard reset, (continued)
- [reclaim-ui] 135/459: hard reset, gnunet, 2021/06/11
- [reclaim-ui] 116/459: authentication screen update - retry client verification, gnunet, 2021/06/11
- [reclaim-ui] 139/459: timeout, gnunet, 2021/06/11
- [reclaim-ui] 132/459: do not re-authorize, gnunet, 2021/06/11
- [reclaim-ui] 137/459: only retry once, gnunet, 2021/06/11
- [reclaim-ui] 138/459: we actually dont need the retry, gnunet, 2021/06/11
- [reclaim-ui] 126/459: change add identity button, gnunet, 2021/06/11
- [reclaim-ui] 127/459: prettify search icon, gnunet, 2021/06/11
- [reclaim-ui] 106/459: changed authentication ui and gnunet offline information, added modals, gnunet, 2021/06/11
- [reclaim-ui] 141/459: Merge branch 'master' into 'master', gnunet, 2021/06/11
- [reclaim-ui] 142/459: fix forjoin bug,
gnunet <=
- [reclaim-ui] 143/459: add error dialogs; fix bugs, gnunet, 2021/06/11
- [reclaim-ui] 140/459: fix for issue #16, gnunet, 2021/06/11
- [reclaim-ui] 136/459: softer reset, gnunet, 2021/06/11
- [reclaim-ui] 144/459: edited openid service to support PKCE, gnunet, 2021/06/11
- [reclaim-ui] 134/459: flush route on cancel, gnunet, 2021/06/11
- [reclaim-ui] 145/459: Merge branch 'master' into 'master', gnunet, 2021/06/11
- [reclaim-ui] 120/459: Updated to Angular 8 * Used new RxJS 6-style operators * Fixed linting errors, gnunet, 2021/06/11
- [reclaim-ui] 146/459: minor style, gnunet, 2021/06/11
- [reclaim-ui] 148/459: fix style, gnunet, 2021/06/11
- [reclaim-ui] 155/459: fixes, gnunet, 2021/06/11