fix(console-v2): app detail layout, create layout stepper (#3680)

* app detail

* app-detail layout

* app layout, create layout component, cleanup

* lint
This commit is contained in:
Max Peintner
2022-05-23 08:43:03 +02:00
committed by GitHub
parent 32ccada7a9
commit 6ec3c56883
56 changed files with 1897 additions and 1906 deletions
@@ -0,0 +1,31 @@
<h1 mat-dialog-title>
<span>{{ 'USER.CODEDIALOG.TITLE' | translate }} {{ data?.number }}</span>
</h1>
<p class="desc cnsl-secondary-text">{{ 'USER.CODEDIALOG.DESCRIPTION' | translate }}</p>
<div mat-dialog-content>
<cnsl-auth-method-radio
[authMethods]="data.authMethods"
[selected]="data.initialAuthMethod"
[current]="data.currentAuthMethod"
[isOIDC]="data.isOIDC"
(selectedMethod)="authmethod = $event"
[compact]="true"
>
</cnsl-auth-method-radio>
</div>
<div mat-dialog-actions class="action">
<button color="primary" mat-stroked-button class="ok-button" (click)="closeDialog()">
{{ 'ACTIONS.CLOSE' | translate }}
</button>
<button
[disabled]="!authmethod"
cdkFocusInitial
color="primary"
mat-raised-button
class="ok-button"
(click)="closeDialogWithMethod()"
>
{{ 'ACTIONS.SELECT' | translate }}
</button>
</div>
@@ -0,0 +1,25 @@
h1 {
font-size: 1.5rem;
margin: 0;
}
.desc {
font-size: 14px;
}
.formfield {
width: 100%;
}
.action {
display: flex;
justify-content: flex-end;
.ok-button {
margin-left: 0.5rem;
}
button {
border-radius: 0.5rem;
}
}
@@ -0,0 +1,24 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { AuthMethodDialogComponent } from './auth-method-dialog.component';
describe('AuthMethodDialogComponent', () => {
let component: AuthMethodDialogComponent;
let fixture: ComponentFixture<AuthMethodDialogComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AuthMethodDialogComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AuthMethodDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,22 @@
import { Component, Inject } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
@Component({
selector: 'cnsl-auth-method-dialog',
templateUrl: './auth-method-dialog.component.html',
styleUrls: ['./auth-method-dialog.component.scss'],
})
export class AuthMethodDialogComponent {
public authmethod: string = '';
constructor(public dialogRef: MatDialogRef<AuthMethodDialogComponent>, @Inject(MAT_DIALOG_DATA) public data: any) {
this.authmethod = data.initialAuthMethod;
}
public closeDialog(): void {
this.dialogRef.close();
}
public closeDialogWithMethod(): void {
this.dialogRef.close(this.authmethod);
}
}