From 3c67c9756d52c11df5693666ace68496a3ad9b6e Mon Sep 17 00:00:00 2001 From: Max Peintner Date: Fri, 26 Aug 2022 08:13:38 +0200 Subject: [PATCH] fix(console): Auth method dialog title, layout issues (#4216) * fix(console): app auth method dialog title * lint --- .../client-keys/client-keys.component.html | 76 +++++++++++++------ .../show-key-dialog.component.html | 21 ++--- .../show-key-dialog.component.scss | 9 +-- .../show-key-dialog.component.ts | 13 ++-- .../show-key-dialog/show-key-dialog.module.ts | 20 ++--- .../auth-method-dialog.component.html | 3 +- 6 files changed, 85 insertions(+), 57 deletions(-) diff --git a/console/src/app/modules/client-keys/client-keys.component.html b/console/src/app/modules/client-keys/client-keys.component.html index 7accf98f52..80c6d42682 100644 --- a/console/src/app/modules/client-keys/client-keys.component.html +++ b/console/src/app/modules/client-keys/client-keys.component.html @@ -1,8 +1,17 @@ - +
- + add{{ 'ACTIONS.NEW' | translate }}
@@ -11,39 +20,46 @@ - - + + - - + + - + - + @@ -51,9 +67,14 @@ - - +
- + [indeterminate]="selection.hasValue() && !isAllSelected()" + > - + {{ 'USER.MACHINE.ID' | translate }} {{key?.id}} {{ 'USER.MACHINE.ID' | translate }}{{ key?.id }} {{ 'USER.MACHINE.TYPE' | translate }} {{'USER.MACHINE.KEYTYPES.'+key?.type | translate}} {{ 'USER.MACHINE.TYPE' | translate }}{{ 'USER.MACHINE.KEYTYPES.' + key?.type | translate }} {{ 'USER.MACHINE.CREATIONDATE' | translate }} {{ 'USER.MACHINE.CREATIONDATE' | translate }} - {{key.details.creationDate | timestampToDate | localizedDate: 'fromNow'}} + {{ key.details.creationDate | timestampToDate | localizedDate: 'fromNow' }} {{ 'USER.MACHINE.EXPIRATIONDATE' | translate }} {{ 'USER.MACHINE.EXPIRATIONDATE' | translate }} - {{key.expirationDate | timestampToDate | localizedDate: 'fromNow'}} + {{ key.expirationDate | timestampToDate | localizedDate: 'fromNow' }} - @@ -61,12 +82,17 @@
- -
\ No newline at end of file + +
diff --git a/console/src/app/modules/show-key-dialog/show-key-dialog.component.html b/console/src/app/modules/show-key-dialog/show-key-dialog.component.html index 67a4e5a296..a3298c147e 100644 --- a/console/src/app/modules/show-key-dialog/show-key-dialog.component.html +++ b/console/src/app/modules/show-key-dialog/show-key-dialog.component.html @@ -1,17 +1,19 @@ -{{'USER.MACHINE.ADDED.TITLE' | translate}} +{{ 'USER.MACHINE.ADDED.TITLE' | translate }}
-

{{'USER.MACHINE.ADDED.DESCRIPTION' | translate}}

+ {{ + 'USER.MACHINE.ADDED.DESCRIPTION' | translate + }}
-

{{'USER.MACHINE.ID' | translate}}

-

{{$any(keyResponse)?.id}}

-

{{$any(keyResponse)?.keyId}}

+

{{ 'USER.MACHINE.ID' | translate }}

+

{{ $any(keyResponse)?.id }}

+

{{ $any(keyResponse)?.keyId }}

-

{{'USER.MACHINE.CREATIONDATE' | translate}}

+

{{ 'USER.MACHINE.CREATIONDATE' | translate }}

- {{ keyResponse.details.creationDate | timestampToDate | localizedDate: 'EEE dd. MMM YYYY, HH:mm' }} + {{ keyResponse.details.creationDate | timestampToDate | localizedDate: 'EEE dd. MMM YYYY, HH:mm' }}

@@ -19,7 +21,8 @@
+ -
\ No newline at end of file + diff --git a/console/src/app/modules/show-key-dialog/show-key-dialog.component.scss b/console/src/app/modules/show-key-dialog/show-key-dialog.component.scss index 06c1d30ab4..e6e602014f 100644 --- a/console/src/app/modules/show-key-dialog/show-key-dialog.component.scss +++ b/console/src/app/modules/show-key-dialog/show-key-dialog.component.scss @@ -3,11 +3,6 @@ margin-top: 0; } -.desc { - color: rgb(201, 51, 71); - font-size: 0.9rem; -} - .form-field { width: 100%; } @@ -16,6 +11,10 @@ display: flex; justify-content: space-between; + .fill-space { + flex: 1; + } + .ok-button { margin-left: 0.5rem; } diff --git a/console/src/app/modules/show-key-dialog/show-key-dialog.component.ts b/console/src/app/modules/show-key-dialog/show-key-dialog.component.ts index 3fb80da936..7914e00137 100644 --- a/console/src/app/modules/show-key-dialog/show-key-dialog.component.ts +++ b/console/src/app/modules/show-key-dialog/show-key-dialog.component.ts @@ -2,6 +2,7 @@ import { Component, Inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { saveAs } from 'file-saver'; import { AddAppKeyResponse, AddMachineKeyResponse } from 'src/app/proto/generated/zitadel/management_pb'; +import { InfoSectionType } from '../info-section/info-section.component'; @Component({ selector: 'cnsl-show-key-dialog', @@ -10,20 +11,18 @@ import { AddAppKeyResponse, AddMachineKeyResponse } from 'src/app/proto/generate }) export class ShowKeyDialogComponent { public keyResponse!: AddMachineKeyResponse.AsObject | AddAppKeyResponse.AsObject; + public InfoSectionType: any = InfoSectionType; - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any, - ) { + constructor(public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: any) { this.keyResponse = data.key; } public saveFile(): void { const json = atob(this.keyResponse.keyDetails.toString()); const blob = new Blob([json], { type: 'text/plain;charset=utf-8' }); - const name = (this.keyResponse as AddMachineKeyResponse.AsObject).keyId ? - (this.keyResponse as AddMachineKeyResponse.AsObject).keyId : - (this.keyResponse as AddAppKeyResponse.AsObject).id; + const name = (this.keyResponse as AddMachineKeyResponse.AsObject).keyId + ? (this.keyResponse as AddMachineKeyResponse.AsObject).keyId + : (this.keyResponse as AddAppKeyResponse.AsObject).id; saveAs(blob, `${name}.json`); } diff --git a/console/src/app/modules/show-key-dialog/show-key-dialog.module.ts b/console/src/app/modules/show-key-dialog/show-key-dialog.module.ts index 9732121f65..f2a82ff4fc 100644 --- a/console/src/app/modules/show-key-dialog/show-key-dialog.module.ts +++ b/console/src/app/modules/show-key-dialog/show-key-dialog.module.ts @@ -4,17 +4,19 @@ import { MatButtonModule } from '@angular/material/button'; import { TranslateModule } from '@ngx-translate/core'; import { LocalizedDatePipeModule } from 'src/app/pipes/localized-date-pipe/localized-date-pipe.module'; import { TimestampToDatePipeModule } from 'src/app/pipes/timestamp-to-date-pipe/timestamp-to-date-pipe.module'; +import { InfoSectionModule } from '../info-section/info-section.module'; import { ShowKeyDialogComponent } from './show-key-dialog.component'; @NgModule({ - declarations: [ShowKeyDialogComponent], - imports: [ - CommonModule, - TranslateModule, - MatButtonModule, - LocalizedDatePipeModule, - TimestampToDatePipeModule, - ], + declarations: [ShowKeyDialogComponent], + imports: [ + CommonModule, + TranslateModule, + MatButtonModule, + LocalizedDatePipeModule, + InfoSectionModule, + TimestampToDatePipeModule, + ], }) -export class ShowKeyDialogModule { } +export class ShowKeyDialogModule {} diff --git a/console/src/app/pages/projects/apps/app-detail/auth-method-dialog/auth-method-dialog.component.html b/console/src/app/pages/projects/apps/app-detail/auth-method-dialog/auth-method-dialog.component.html index 50f867fa1c..399b3aff6d 100644 --- a/console/src/app/pages/projects/apps/app-detail/auth-method-dialog/auth-method-dialog.component.html +++ b/console/src/app/pages/projects/apps/app-detail/auth-method-dialog/auth-method-dialog.component.html @@ -1,7 +1,6 @@

- {{ 'USER.CODEDIALOG.TITLE' | translate }} {{ data?.number }} + {{ 'APP.PAGES.DIALOG.CONFIG.TITLE' | translate }} {{ data?.number }}

-

{{ 'USER.CODEDIALOG.DESCRIPTION' | translate }}