mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-07 06:42:15 +00:00
feat(console): user metadata, rehaul detail pages (#2209)
* service, sidenav, i18n, dialog * detail layout, user detail * metadata dialog from * dialog * features * formarray * metadata component * comp * user metadata refresh * use formarray, control, bulk save * metadata revert, has feature directive * lint * lint * typo * info row user, warn color optim * card cleanup, actions for user detail * project, org, user, app rehaul * lint * scss * digit fix * features and project grid rehaul * info-section layout, org domain info * readd palette scss * add svg email warn * missing translation * rm unused ts * lockoutpolicy * check for lockout feature
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<h1 mat-dialog-title>
|
||||
<span>{{data.titleKey | translate}} {{data?.number}}</span>
|
||||
</h1>
|
||||
<p class="desc">{{data.descKey | translate}}</p>
|
||||
<div mat-dialog-content>
|
||||
<cnsl-form-field class="formfield">
|
||||
<cnsl-label>{{ data.labelKey | translate }}</cnsl-label>
|
||||
<input cnslInput [(ngModel)]="name" />
|
||||
</cnsl-form-field>
|
||||
</div>
|
||||
<div mat-dialog-actions class="action">
|
||||
<button color="primary" mat-stroked-button class="ok-button" (click)="closeDialog()">
|
||||
{{'ACTIONS.CLOSE' | translate}}
|
||||
</button>
|
||||
|
||||
<button [disabled]="!name" cdkFocusInitial color="primary" mat-raised-button class="ok-button"
|
||||
(click)="closeDialog(name)">
|
||||
{{'ACTIONS.RENAME' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
@@ -0,0 +1,26 @@
|
||||
h1 {
|
||||
font-size: 1.5rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 14px;
|
||||
color: var(--grey);
|
||||
}
|
||||
|
||||
.formfield {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.action {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.ok-button {
|
||||
margin-left: .5rem;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: .5rem;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
|
||||
import { CodeDialogComponent } from './code-dialog.component';
|
||||
|
||||
describe('CodeDialogComponent', () => {
|
||||
let component: CodeDialogComponent;
|
||||
let fixture: ComponentFixture<CodeDialogComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [CodeDialogComponent],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CodeDialogComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
|
||||
@Component({
|
||||
selector: 'app-name-dialog',
|
||||
templateUrl: './name-dialog.component.html',
|
||||
styleUrls: ['./name-dialog.component.scss'],
|
||||
})
|
||||
export class NameDialogComponent {
|
||||
public name: string = '';
|
||||
constructor(public dialogRef: MatDialogRef<NameDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||
this.name = data.name ?? '';
|
||||
}
|
||||
|
||||
closeDialog(name: string = ''): void {
|
||||
this.dialogRef.close(name);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
import { InputModule } from '../input/input.module';
|
||||
import { NameDialogComponent } from './name-dialog.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
NameDialogComponent,
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
MatDialogModule,
|
||||
MatButtonModule,
|
||||
TranslateModule,
|
||||
InputModule,
|
||||
FormsModule,
|
||||
],
|
||||
exports: [
|
||||
NameDialogComponent,
|
||||
],
|
||||
})
|
||||
export class NameDialogModule { }
|
||||
Reference in New Issue
Block a user