[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[reclaim-ui] 410/459: enable filtering
From: |
gnunet |
Subject: |
[reclaim-ui] 410/459: enable filtering |
Date: |
Fri, 11 Jun 2021 23:28:22 +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 6f8e9b5c7ece90d711b30b3bf88e3270b3a94c8f
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Tue Jan 5 19:32:07 2021 +0900
enable filtering
---
src/app/config.service.ts | 4 ++--
src/app/config.ts | 2 +-
src/app/edit-identity/edit-identity.component.html | 2 +-
src/app/identity-list/identity-list.component.ts | 6 ++++++
src/assets/config.json | 3 ++-
src/locales/de/messages.json | 1 +
src/locales/en/messages.json | 1 +
7 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/app/config.service.ts b/src/app/config.service.ts
index 7a10c0e..3da3d96 100644
--- a/src/app/config.service.ts
+++ b/src/app/config.service.ts
@@ -9,9 +9,9 @@ export class ConfigService {
defaultConfig: Config;
constructor(private http: HttpClient) {
- this.config = new Config('',true);
+ this.config = new Config('',true, []);
var confString = localStorage.getItem('reclaimSettings');
- this.config = new Config('',true);
+ this.config = new Config('',true, []);
try {
var jsonConfig = JSON.parse(confString);
if (jsonConfig == null) {
diff --git a/src/app/config.ts b/src/app/config.ts
index 218c4de..e50b9b1 100644
--- a/src/app/config.ts
+++ b/src/app/config.ts
@@ -1,3 +1,3 @@
export class Config {
- constructor(public apiUrl: string, public experiments: boolean) { }
+ constructor(public apiUrl: string, public experiments: boolean, public
filteredIDs: string[]) { }
}
diff --git a/src/app/edit-identity/edit-identity.component.html
b/src/app/edit-identity/edit-identity.component.html
index 592c75e..7129dd0 100644
--- a/src/app/edit-identity/edit-identity.component.html
+++ b/src/app/edit-identity/edit-identity.component.html
@@ -294,7 +294,7 @@
<!-- Edit card buttons -->
<div>
<button class="btn btn-primary" (click)="goBack()">
- <span class="fa fa-arrow-left"></span> {{ getMessage("Back") }}
+ <span class="fa fa-arrow-left"></span> {{
getMessage("edit_identity_html@identitySelection") }}
</button>
<button *ngIf="oidcService.inOpenIdFlow()"
[disabled]="!isClientVerified() || attributes.length <= 0"
(click)="loginIdentity(identity)"
class="btn btn-success mr-1 openid-login">
diff --git a/src/app/identity-list/identity-list.component.ts
b/src/app/identity-list/identity-list.component.ts
index 4120592..54ffac4 100644
--- a/src/app/identity-list/identity-list.component.ts
+++ b/src/app/identity-list/identity-list.component.ts
@@ -9,6 +9,7 @@ import { IdentityService } from '../identity.service';
import { NamestoreService } from '../namestore.service';
import { OpenIdService } from '../open-id.service';
import { ReclaimService } from '../reclaim.service';
+import { ConfigService } from '../config.service';
import { ModalService } from '../modal.service';
import { finalize } from 'rxjs/operators';
import { from, forkJoin, EMPTY } from 'rxjs';
@@ -47,6 +48,7 @@ export class IdentityListComponent implements OnInit {
private namestoreService: NamestoreService,
private gnsService: GnsService,
private modalService: ModalService,
+ private configService: ConfigService,
private languageService: LanguageService,
private router: Router,) {
}
@@ -378,6 +380,10 @@ export class IdentityListComponent implements OnInit {
this.identities = [];
let i;
for (i = 0; i < identities.length; i++) {
+ let filteredIDs = this.configService.get().filteredIDs;
+ if (filteredIDs.indexOf(identities[i].name) !== -1) {
+ continue;
+ }
this.identities.push(identities[i]);
}
diff --git a/src/assets/config.json b/src/assets/config.json
index 4c424c6..9286250 100644
--- a/src/assets/config.json
+++ b/src/assets/config.json
@@ -1,4 +1,5 @@
{
"apiUrl": "http://localhost:7776",
- "experiments": true
+ "experiments": true,
+ "filteredIDs": ["wootaler-shop"]
}
diff --git a/src/locales/de/messages.json b/src/locales/de/messages.json
index c361e07..fab1523 100644
--- a/src/locales/de/messages.json
+++ b/src/locales/de/messages.json
@@ -69,6 +69,7 @@
"edit_identity_html@infoMissingClaims": "Die Website hat die folgenden
Attribute angefragt. Du bist nicht verpflichtet diese Attribute
bereitzustellen. Die Webseite könnte jedoch die Informationen im Rahmen einer
Dienstleistung benötigen.",
"edit_identity_html@selfissued": "Selbst ausgestellt",
"edit_identity_html@importFrom": "Von ``{{ISSUERNAME}}´´ importieren",
+ "edit_identity_html@identitySelection": "Identitätsauswahl",
"import_attributes_html@importFor": "Attribute für {{IDENTITYNAME}}
importieren",
"edit_identity_html@unset": "Nicht gesetzt",
"edit_identity_html@attribute": "Attribut",
diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json
index cf21407..d532bc2 100644
--- a/src/locales/en/messages.json
+++ b/src/locales/en/messages.json
@@ -69,6 +69,7 @@
"edit_identity_html@infoMissingClaims": "The website requests the
following attributes. You may provide any of the requested attributes but are
not required to. The website may require the attributes in the scope of its
service offering.",
"edit_identity_html@selfissued": "Self-issued",
"edit_identity_html@importFrom": "Try import from ``{{ISSUERNAME}}''",
+ "edit_identity_html@identitySelection": "Identity selection",
"import_attributes_html@importFor": "Import attributes for
{{IDENTITYNAME}}",
"edit_identity_html@unset": "Unset",
"edit_identity_html@attribute": "Attribute",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [reclaim-ui] 396/459: relax attribute requirements, (continued)
- [reclaim-ui] 396/459: relax attribute requirements, gnunet, 2021/06/11
- [reclaim-ui] 388/459: significantly simplify identity edit, gnunet, 2021/06/11
- [reclaim-ui] 418/459: more cleanup, gnunet, 2021/06/11
- [reclaim-ui] 431/459: Added translation using Weblate (Portuguese), gnunet, 2021/06/11
- [reclaim-ui] 430/459: mini fix, gnunet, 2021/06/11
- [reclaim-ui] 405/459: fix search icon, gnunet, 2021/06/11
- [reclaim-ui] 381/459: even more quality of life improvements, gnunet, 2021/06/11
- [reclaim-ui] 416/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 392/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 411/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 410/459: enable filtering,
gnunet <=
- [reclaim-ui] 389/459: update, gnunet, 2021/06/11
- [reclaim-ui] 414/459: replace table, gnunet, 2021/06/11
- [reclaim-ui] 400/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 425/459: fix logo, gnunet, 2021/06/11
- [reclaim-ui] 434/459: Added translation using Weblate (Portuguese (Brazil)), gnunet, 2021/06/11
- [reclaim-ui] 429/459: yarn upgrade, gnunet, 2021/06/11
- [reclaim-ui] 390/459: update dependencies, gnunet, 2021/06/11
- [reclaim-ui] 408/459: various fixes, gnunet, 2021/06/11
- [reclaim-ui] 398/459: select attributes to overwrite, gnunet, 2021/06/11
- [reclaim-ui] 435/459: Translated using Weblate (Portuguese), gnunet, 2021/06/11