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
@@ -1,39 +1,51 @@
<div class="auth-method-radio-button-wrapper">
<div class="auth-method-radio-button-wrapper" [ngClass]="{ compact: compact }">
<ng-container *ngFor="let method of authMethods; index as i">
<input type="radio" [disabled]="method.disabled" (change)="emitChange()" [value]="method.key" [id]="method.key"
[(ngModel)]="selected" />
<label class="cnsl-radio-button" [ngClass]="{'first': i === 0, 'last': i === authMethods.length - 1}"
[for]="method.key">
<div class="recommended" [ngClass]="{'not': method.notRecommended}"
*ngIf="method.recommended || method.notRecommended">
{{(method.recommended ?
'APP.OIDC.RECOMMENDED' : 'APP.OIDC.NOTRECOMMENDED') | translate }}</div>
<div class="cnsl-radio-header" [ngStyle]="{'background': method.background}">
<span>{{method.prefix}}</span>
<div class="current" *ngIf="current === method.key">{{'APP.OIDC.CURRENT' | translate}}</div>
<input
type="radio"
[disabled]="method.disabled"
(change)="emitChange()"
[value]="method.key"
[id]="method.key"
[(ngModel)]="selected"
/>
<label
class="cnsl-radio-button"
[ngClass]="{ compact: compact, first: i === 0, last: i === authMethods.length - 1 }"
[for]="method.key"
>
<div
class="recommended"
[ngClass]="{ not: method.notRecommended }"
*ngIf="method.recommended || method.notRecommended"
>
{{ (method.recommended ? 'APP.OIDC.RECOMMENDED' : 'APP.OIDC.NOTRECOMMENDED') | translate }}
</div>
<p>{{method.titleI18nKey | translate}}</p>
<p class="type-desc cnsl-secondary-text">{{method.descI18nKey | translate}}</p>
<div class="cnsl-radio-header" [ngStyle]="{ background: method.background }">
<span>{{ method.prefix }}</span>
<div class="current" *ngIf="current === method.key">{{ 'APP.OIDC.CURRENT' | translate }}</div>
</div>
<p>{{ method.titleI18nKey | translate }}</p>
<p class="type-desc cnsl-secondary-text">{{ method.descI18nKey | translate }}</p>
<span class="fill-space"></span>
<div class="app-specs cnsl-secondary-text">
<div class="row" *ngIf="isOIDC && method && method.responseType !== undefined">
<span>{{'APP.OIDC.RESPONSETYPE' | translate}}</span>
<span>{{('APP.OIDC.RESPONSE.'+method.responseType.toString()) | translate}}</span>
<span>{{ 'APP.OIDC.RESPONSETYPE' | translate }}</span>
<span>{{ 'APP.OIDC.RESPONSE.' + method.responseType.toString() | translate }}</span>
</div>
<div class="row" *ngIf="isOIDC && method.grantType !== undefined">
<span>{{'APP.GRANT' | translate}}</span>
<span>{{('APP.OIDC.GRANT.'+method.grantType.toString()) | translate}}</span>
<span>{{ 'APP.GRANT' | translate }}</span>
<span>{{ 'APP.OIDC.GRANT.' + method.grantType.toString() | translate }}</span>
</div>
<div class="row" *ngIf="isOIDC && method.authMethod !== undefined">
<span>{{'APP.AUTHMETHOD' | translate}}</span>
<span>{{('APP.OIDC.AUTHMETHOD.'+method.authMethod.toString()) | translate}}</span>
<span>{{ 'APP.AUTHMETHOD' | translate }}</span>
<span>{{ 'APP.OIDC.AUTHMETHOD.' + method.authMethod.toString() | translate }}</span>
</div>
<div class="row" *ngIf="!isOIDC && method.apiAuthMethod !== undefined">
<span>{{'APP.AUTHMETHOD' | translate}}</span>
<span>{{('APP.API.AUTHMETHOD.'+method.apiAuthMethod.toString()) | translate}}</span>
<span>{{ 'APP.AUTHMETHOD' | translate }}</span>
<span>{{ 'APP.API.AUTHMETHOD.' + method.apiAuthMethod.toString() | translate }}</span>
</div>
</div>
</label>
</ng-container>
</div>
</div>
@@ -9,6 +9,13 @@
margin: 0;
padding-bottom: 0.5rem;
padding-top: 1rem;
&.compact {
display: grid;
grid-template-columns: 1fr 1fr;
column-gap: 1rem;
row-gap: 1rem;
}
}
@mixin app-auth-method-radio-theme($theme) {
@@ -108,6 +115,17 @@
}
}
&.compact {
margin: 0;
width: 230px;
.cnsl-radio-header {
span {
margin: 1rem 0 1.5rem 0;
}
}
}
p {
text-align: center;
padding: 0 1rem;
@@ -1,9 +1,9 @@
import { Component, EventEmitter, Input, Output } from '@angular/core';
import {
APIAuthMethodType,
OIDCAuthMethodType,
OIDCGrantType,
OIDCResponseType,
APIAuthMethodType,
OIDCAuthMethodType,
OIDCGrantType,
OIDCResponseType,
} from 'src/app/proto/generated/zitadel/app_pb';
export interface RadioItemAuthType {
@@ -16,7 +16,7 @@ export interface RadioItemAuthType {
responseType?: OIDCResponseType;
grantType?: OIDCGrantType;
authMethod?: OIDCAuthMethodType;
apiAuthMethod?: | APIAuthMethodType;
apiAuthMethod?: APIAuthMethodType;
recommended?: boolean;
notRecommended?: boolean;
}
@@ -31,6 +31,7 @@ export class AppAuthMethodRadioComponent {
@Input() selected: string = '';
@Input() authMethods!: RadioItemAuthType[];
@Input() isOIDC: boolean = false;
@Input() compact: boolean = false;
@Output() selectedMethod: EventEmitter<string> = new EventEmitter();
public emitChange(): void {