mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-19 03:35:12 +00:00
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:
+48
-56
@@ -1,62 +1,54 @@
|
||||
<div class="max-width-container container">
|
||||
<div class="abort-container">
|
||||
<button (click)="close()" mat-icon-button>
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
<span class="abort">{{ 'PROJECT.GRANT.CREATE.TITLE' | translate }}</span><span class="abort-2">Step
|
||||
{{ currentCreateStep }} of
|
||||
{{ STEPS }}</span>
|
||||
</div>
|
||||
<cnsl-create-layout
|
||||
title="{{ 'PROJECT.GRANT.CREATE.TITLE' | translate }}"
|
||||
[createSteps]="createSteps"
|
||||
[currentCreateStep]="currentCreateStep"
|
||||
(closed)="close()"
|
||||
>
|
||||
<ng-container *ngIf="currentCreateStep === 1">
|
||||
<h1>{{ 'PROJECT.GRANT.CREATE.SEL_ORG' | translate }}</h1>
|
||||
<p>{{ 'PROJECT.GRANT.CREATE.SEL_ORG_DESC' | translate }}</p>
|
||||
|
||||
<div class="create-content">
|
||||
<form (ngSubmit)="searchOrg(domain.value)">
|
||||
<cnsl-form-field class="org-domain">
|
||||
<cnsl-label>{{ 'PROJECT.GRANT.CREATE.SEL_ORG_FORMFIELD' | translate }}</cnsl-label>
|
||||
<input cnslInput #domain />
|
||||
</cnsl-form-field>
|
||||
|
||||
<button [disabled]="domain.value.length === 0" color="primary" type="submit" class="domain-button" mat-raised-button>
|
||||
{{ 'PROJECT.GRANT.CREATE.SEL_ORG_BUTTON' | translate }}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<span *ngIf="org"> {{ 'PROJECT.GRANT.CREATE.FOR_ORG' | translate }} {{ org?.name }} </span>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="currentCreateStep === 2">
|
||||
<h1>{{ 'PROJECT.GRANT.CREATE.SEL_ROLES' | translate }}</h1>
|
||||
|
||||
<cnsl-card *ngIf="projectId">
|
||||
<cnsl-project-roles-table
|
||||
[displayedColumns]="['select', 'key', 'displayname', 'group', 'creationDate', 'changeDate']"
|
||||
(changedSelection)="selectRoles($event)"
|
||||
[projectId]="projectId"
|
||||
>
|
||||
</cnsl-project-roles-table>
|
||||
</cnsl-card>
|
||||
</ng-container>
|
||||
|
||||
<div class="btn-container">
|
||||
<ng-container *ngIf="currentCreateStep === 1">
|
||||
<h1>{{'PROJECT.GRANT.CREATE.SEL_ORG' | translate}}</h1>
|
||||
<p>{{'PROJECT.GRANT.CREATE.SEL_ORG_DESC' | translate}}</p>
|
||||
|
||||
<form (ngSubmit)="searchOrg(domain.value)">
|
||||
<cnsl-form-field class="org-domain">
|
||||
<cnsl-label>{{'PROJECT.GRANT.CREATE.SEL_ORG_FORMFIELD' | translate}}</cnsl-label>
|
||||
<input cnslInput #domain />
|
||||
</cnsl-form-field>
|
||||
|
||||
<button [disabled]="domain.value.length === 0" color="primary" type="submit" class="domain-button"
|
||||
mat-raised-button>
|
||||
{{'PROJECT.GRANT.CREATE.SEL_ORG_BUTTON' | translate}}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<span *ngIf="org">
|
||||
{{'PROJECT.GRANT.CREATE.FOR_ORG' | translate}} {{org?.name}}
|
||||
</span>
|
||||
<button [disabled]="!org" (click)="next()" color="primary" mat-raised-button class="big-button" cdkFocusInitial>
|
||||
{{ 'ACTIONS.CONTINUE' | translate }}
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="currentCreateStep === 2">
|
||||
<h1>{{'PROJECT.GRANT.CREATE.SEL_ROLES' | translate}}</h1>
|
||||
|
||||
<cnsl-card *ngIf="projectId">
|
||||
<cnsl-project-roles-table
|
||||
[displayedColumns]="['select', 'key', 'displayname', 'group', 'creationDate', 'changeDate']"
|
||||
(changedSelection)="selectRoles($event)" [projectId]="projectId">
|
||||
</cnsl-project-roles-table>
|
||||
</cnsl-card>
|
||||
<ng-container *ngIf="currentCreateStep === createSteps">
|
||||
<button (click)="previous()" mat-stroked-button class="small-button">
|
||||
{{ 'ACTIONS.BACK' | translate }}
|
||||
</button>
|
||||
<button color="primary" [disabled]="!org" (click)="addGrant()" mat-raised-button class="big-button" cdkFocusInitial>
|
||||
{{ 'ACTIONS.SAVE' | translate }}
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
<div class="btn-container">
|
||||
<ng-container *ngIf="currentCreateStep === 1">
|
||||
<button [disabled]="!org" (click)="next()" color="primary" mat-raised-button class="big-button" cdkFocusInitial>
|
||||
{{ 'ACTIONS.CONTINUE' | translate }}
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="currentCreateStep === STEPS">
|
||||
<button (click)="previous()" mat-stroked-button class="small-button">
|
||||
{{ 'ACTIONS.BACK' | translate }}
|
||||
</button>
|
||||
<button color="primary" [disabled]="!org" (click)="addGrant()" mat-raised-button class="big-button"
|
||||
cdkFocusInitial>
|
||||
{{ 'ACTIONS.SAVE' | translate }}
|
||||
</button>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</cnsl-create-layout>
|
||||
|
||||
+4
-30
@@ -1,34 +1,8 @@
|
||||
.container {
|
||||
padding: 4rem 0 2rem 0;
|
||||
form {
|
||||
max-width: 35rem;
|
||||
|
||||
.abort-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 2rem;
|
||||
white-space: nowrap;
|
||||
|
||||
.abort {
|
||||
font-size: 1.2rem;
|
||||
margin-left: 2rem;
|
||||
}
|
||||
|
||||
.abort-2 {
|
||||
font-size: 1.2rem;
|
||||
margin-left: 2rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.create-content {
|
||||
padding-left: 4.5rem;
|
||||
|
||||
form {
|
||||
max-width: 35rem;
|
||||
|
||||
.org-domain {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
}
|
||||
.org-domain {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ export class ProjectGrantCreateComponent implements OnInit, OnDestroy {
|
||||
public grantId: string = '';
|
||||
public rolesKeyList: string[] = [];
|
||||
|
||||
public STEPS: number = 2;
|
||||
public createSteps: number = 2;
|
||||
public currentCreateStep: number = 1;
|
||||
|
||||
private destroy$: Subject<void> = new Subject();
|
||||
|
||||
+2
@@ -10,6 +10,7 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { CardModule } from 'src/app/modules/card/card.module';
|
||||
import { CreateLayoutModule } from 'src/app/modules/create-layout/create-layout.module';
|
||||
import { InputModule } from 'src/app/modules/input/input.module';
|
||||
import { ProjectRolesTableModule } from 'src/app/modules/project-roles-table/project-roles-table.module';
|
||||
import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe/has-role-pipe.module';
|
||||
@@ -25,6 +26,7 @@ import { ProjectGrantCreateComponent } from './project-grant-create.component';
|
||||
MatAutocompleteModule,
|
||||
MatChipsModule,
|
||||
MatButtonModule,
|
||||
CreateLayoutModule,
|
||||
InputModule,
|
||||
CardModule,
|
||||
MatCheckboxModule,
|
||||
|
||||
+25
-17
@@ -1,14 +1,10 @@
|
||||
<div class="container">
|
||||
<div class="abort-container">
|
||||
<button (click)="close()" mat-icon-button>
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
<span class="abort">{{ 'PROJECT.ROLE.ADDTITLE' | translate }}</span><span class="abort-2">Step
|
||||
{{ currentCreateStep }} of
|
||||
{{ createSteps }}</span>
|
||||
</div>
|
||||
|
||||
<h1>{{'PROJECT.ROLE.ADDDESCRIPTION' | translate}}</h1>
|
||||
<cnsl-create-layout
|
||||
title="{{ 'PROJECT.ROLE.ADDTITLE' | translate }}"
|
||||
[createSteps]="1"
|
||||
[currentCreateStep]="1"
|
||||
(closed)="close()"
|
||||
>
|
||||
<h1>{{ 'PROJECT.ROLE.ADDDESCRIPTION' | translate }}</h1>
|
||||
|
||||
<form @list (ngSubmit)="addRole()">
|
||||
<div @animate *ngFor="let formGroup of formArray.controls; index as i" class="newrole-content">
|
||||
@@ -27,20 +23,32 @@
|
||||
<input cnslInput formControlName="group" />
|
||||
</cnsl-form-field>
|
||||
</div>
|
||||
<button *ngIf="i !== 0" mat-icon-button (click)="removeEntry(i)" type="button" color="warn"
|
||||
matTooltip="{{ 'ACTIONS.REMOVE' | translate }}">
|
||||
<button
|
||||
*ngIf="i !== 0"
|
||||
mat-icon-button
|
||||
(click)="removeEntry(i)"
|
||||
type="button"
|
||||
color="warn"
|
||||
matTooltip="{{ 'ACTIONS.REMOVE' | translate }}"
|
||||
>
|
||||
<i class="las la-trash"></i>
|
||||
</button>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<button class="add-line-btn" color="primary" type="button" mat-stroked-button (click)="addEntry()">
|
||||
{{'PROJECT.ROLE.ADDNEWLINE' | translate}}
|
||||
{{ 'PROJECT.ROLE.ADDNEWLINE' | translate }}
|
||||
</button>
|
||||
|
||||
<button color="primary" mat-raised-button class="continue-button" [disabled]="formArray.invalid" type="submit"
|
||||
[attr.data-e2e]="'save-button'">
|
||||
<button
|
||||
color="primary"
|
||||
mat-raised-button
|
||||
class="continue-button"
|
||||
[disabled]="formArray.invalid"
|
||||
type="submit"
|
||||
[attr.data-e2e]="'save-button'"
|
||||
>
|
||||
{{ 'ACTIONS.SAVE' | translate }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</cnsl-create-layout>
|
||||
|
||||
+4
-29
@@ -1,31 +1,6 @@
|
||||
.container {
|
||||
padding: 4rem 4rem 2rem 4rem;
|
||||
|
||||
@media only screen and (max-width: 450px) {
|
||||
padding: 4rem 1rem 2rem 1rem;
|
||||
}
|
||||
|
||||
.abort-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 2rem;
|
||||
|
||||
.abort {
|
||||
font-size: 1.2rem;
|
||||
margin-left: 2rem;
|
||||
}
|
||||
|
||||
.abort-2 {
|
||||
font-size: 1.2rem;
|
||||
margin-left: 2rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.add-line-btn {
|
||||
margin-bottom: 1rem;
|
||||
border-radius: .5rem;
|
||||
}
|
||||
.add-line-btn {
|
||||
margin-bottom: 1rem;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
.newrole-content {
|
||||
@@ -55,7 +30,7 @@
|
||||
.continue-button {
|
||||
margin-top: 3rem;
|
||||
display: block;
|
||||
padding: .5rem 4rem;
|
||||
padding: 0.5rem 4rem;
|
||||
|
||||
@media only screen and (max-width: 450px) {
|
||||
margin-top: 1rem;
|
||||
|
||||
-2
@@ -36,8 +36,6 @@ export class ProjectRoleCreateComponent implements OnInit, OnDestroy {
|
||||
displayName: new FormControl(''),
|
||||
group: new FormControl(''),
|
||||
});
|
||||
public createSteps: number = 1;
|
||||
public currentCreateStep: number = 1;
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
|
||||
+15
-13
@@ -5,23 +5,25 @@ import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { CreateLayoutModule } from 'src/app/modules/create-layout/create-layout.module';
|
||||
import { InputModule } from 'src/app/modules/input/input.module';
|
||||
|
||||
import { ProjectRoleCreateRoutingModule } from './project-role-create-routing.module';
|
||||
import { ProjectRoleCreateComponent } from './project-role-create.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [ProjectRoleCreateComponent],
|
||||
imports: [
|
||||
ProjectRoleCreateRoutingModule,
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
InputModule,
|
||||
MatButtonModule,
|
||||
MatIconModule,
|
||||
MatTooltipModule,
|
||||
TranslateModule,
|
||||
],
|
||||
declarations: [ProjectRoleCreateComponent],
|
||||
imports: [
|
||||
ProjectRoleCreateRoutingModule,
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
InputModule,
|
||||
CreateLayoutModule,
|
||||
MatButtonModule,
|
||||
MatIconModule,
|
||||
MatTooltipModule,
|
||||
TranslateModule,
|
||||
],
|
||||
})
|
||||
export class ProjectRoleCreateModule { }
|
||||
export class ProjectRoleCreateModule {}
|
||||
|
||||
Reference in New Issue
Block a user