mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-23 05:18:46 +00:00
feat(console): user grant filtering, org domain verification improvements, fix membership detail link (#916)
* user grant filter * add filter input * org domain spinner and reload * user grant filter templates * single selection filter for grants, same dl btn * filter margin * lint style, remove duplicate code * project count as observable * deferred reload on delete * fix user grant formfield * lint styles * fix event propagation on pin, change selection * propagate counter change * admin warn, localstorage, i18n, sidenav impv * overlays * adapt toolbar elevationn, card * color vars, i18n, admin section * fix lint * selection clear on filter * ts lint * Update console/src/assets/i18n/de.json Co-authored-by: Fabi <[email protected]> * Update console/src/assets/i18n/de.json Co-authored-by: Fabi <[email protected]> * Update console/src/assets/i18n/en.json Co-authored-by: Fabi <[email protected]> Co-authored-by: Fabi <[email protected]>
This commit is contained in:
+13
-6
@@ -12,8 +12,10 @@
|
||||
{{'ORG.PAGES.ORGDOMAIN.TYPES.'+ domain.validationType | translate}}</p>
|
||||
<div *ngIf="domain.validationType !== OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_UNSPECIFIED"
|
||||
class="btn-container">
|
||||
<button color="primary" type="submit" mat-raised-button *ngIf="!(dns || http)"
|
||||
(click)="validate()">{{ 'ACTIONS.VERIFY' | translate }}</button>
|
||||
<button color="primary" type="submit" mat-raised-button *ngIf="!(dns || http)" (click)="validate()">
|
||||
{{ 'ACTIONS.VERIFY' | translate }}
|
||||
</button>
|
||||
<mat-spinner class="spinner" *ngIf="validating" diameter="20" mode="indeterminate"></mat-spinner>
|
||||
|
||||
<button *ngIf="!showNew" mat-stroked-button color="primary"
|
||||
(click)="showNew = true">{{'ORG.PAGES.ORGDOMAIN.REQUESTNEWTOKEN' | translate}}</button>
|
||||
@@ -34,8 +36,11 @@
|
||||
<div class="btn-container">
|
||||
<button mat-stroked-button (click)="saveFile()"
|
||||
color="primary">{{ 'ORG.PAGES.DOWNLOAD_FILE' | translate }}</button>
|
||||
<button color="primary" type="submit" mat-raised-button
|
||||
(click)="validate()">{{ 'ACTIONS.VERIFY' | translate }}</button>
|
||||
<button color="primary" class="verify-button" type="submit" mat-raised-button (click)="validate()">
|
||||
<span>{{ 'ACTIONS.VERIFY' | translate }}</span>
|
||||
<mat-spinner class="spinner" *ngIf="!validating" diameter="20" mode="indeterminate"></mat-spinner>
|
||||
</button>
|
||||
<mat-spinner class="spinner" *ngIf="validating" diameter="20" mode="indeterminate"></mat-spinner>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -48,8 +53,10 @@
|
||||
<i *ngIf="copied != dns.token" class="las la-clipboard"></i>
|
||||
<i *ngIf="copied == dns.token" class="las la-clipboard-check"></i>
|
||||
</button>
|
||||
<button color="primary" type="submit" mat-raised-button
|
||||
(click)="validate()">{{ 'ACTIONS.VERIFY' | translate }}</button>
|
||||
<button color="primary" type="submit" mat-raised-button class="verify-button" (click)="validate()">
|
||||
{{ 'ACTIONS.VERIFY' | translate }}
|
||||
</button>
|
||||
<mat-spinner class="spinner" *ngIf="validating" diameter="20" mode="indeterminate"></mat-spinner>
|
||||
</div>
|
||||
<p class="entry">{{dns?.url}}</p>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -1,10 +1,10 @@
|
||||
.btn-container {
|
||||
display: flex;
|
||||
margin: -.5rem;
|
||||
align-items: center;
|
||||
|
||||
button {
|
||||
margin: 1rem .5rem;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-1
@@ -21,6 +21,7 @@ export class DomainVerificationComponent {
|
||||
|
||||
public showNew: boolean = false;
|
||||
|
||||
public validating: boolean = false;
|
||||
constructor(
|
||||
private toast: ToastService,
|
||||
public dialogRef: MatDialogRef<DomainVerificationComponent>,
|
||||
@@ -54,10 +55,14 @@ export class DomainVerificationComponent {
|
||||
}
|
||||
|
||||
public validate(): void {
|
||||
this.validating = true;
|
||||
this.mgmtService.ValidateMyOrgDomain(this.domain.domain).then(() => {
|
||||
this.dialogRef.close(false);
|
||||
this.dialogRef.close(true);
|
||||
this.toast.showInfo('ORG.PAGES.ORGDOMAIN.VERIFICATION_SUCCESSFUL', true);
|
||||
this.validating = false;
|
||||
}).catch((error) => {
|
||||
this.toast.showError(error);
|
||||
this.validating = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
.verified,
|
||||
.primary {
|
||||
color: #5282c1;
|
||||
color: var(--color-main);
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,10 +79,12 @@ export class OrgDetailComponent implements OnInit, OnDestroy {
|
||||
}).catch(error => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
|
||||
this.loadMembers();
|
||||
this.loadDomains();
|
||||
}
|
||||
|
||||
this.mgmtService.SearchMyOrgDomains(0, 100).then(result => {
|
||||
public loadDomains(): void {
|
||||
this.mgmtService.SearchMyOrgDomains().then(result => {
|
||||
this.domains = result.toObject().resultList;
|
||||
this.primaryDomain = this.domains.find(domain => domain.primary)?.domain ?? '';
|
||||
});
|
||||
@@ -91,7 +93,7 @@ export class OrgDetailComponent implements OnInit, OnDestroy {
|
||||
public setPrimary(domain: OrgDomainView.AsObject): void {
|
||||
this.mgmtService.setMyPrimaryOrgDomain(domain.domain).then(() => {
|
||||
this.toast.showInfo('ORG.TOAST.SETPRIMARY', true);
|
||||
this.getData();
|
||||
this.loadDomains();
|
||||
}).catch((error) => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
@@ -202,12 +204,18 @@ export class OrgDetailComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
public verifyDomain(domain: OrgDomainView.AsObject): void {
|
||||
this.dialog.open(DomainVerificationComponent, {
|
||||
const dialogRef = this.dialog.open(DomainVerificationComponent, {
|
||||
data: {
|
||||
domain: domain,
|
||||
},
|
||||
width: '500px',
|
||||
});
|
||||
|
||||
dialogRef.afterClosed().subscribe((reload) => {
|
||||
if (reload) {
|
||||
this.loadDomains();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public loadMembers(): void {
|
||||
|
||||
@@ -8,6 +8,7 @@ import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatTabsModule } from '@angular/material/tabs';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@@ -51,6 +52,7 @@ import { OrgsRoutingModule } from './orgs-routing.module';
|
||||
MemberCreateDialogModule,
|
||||
MatMenuModule,
|
||||
ChangesModule,
|
||||
MatProgressSpinnerModule,
|
||||
AddDomainDialogModule,
|
||||
TranslateModule,
|
||||
SharedModule,
|
||||
|
||||
Reference in New Issue
Block a user