fix(console): intercept navigator.language, set browser lang as default for user without explicit setting, user table outline, member create dialog import (#820)

* i18n interceptor, set language to browser lang

* nullcheck

* rm external idp log

* fix module imports, rm user displayname from i18n

* Update console/src/assets/i18n/de.json

Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
This commit is contained in:
Max Peintner
2020-10-08 14:49:47 +02:00
committed by GitHub
parent 0bbc9c7c49
commit 286bba1c70
17 changed files with 54 additions and 13 deletions

View File

@@ -67,7 +67,6 @@ export class ExternalIdpsComponent implements OnInit {
promise.then(resp => {
this.externalIdpResult = resp.toObject();
this.dataSource.data = this.externalIdpResult.resultList;
console.log(this.externalIdpResult.resultList);
this.loadingSubject.next(false);
}).catch((error: any) => {
this.toast.showError(error);

View File

@@ -199,8 +199,6 @@ export class UserDetailComponent implements OnInit, OnDestroy {
confirmKey: 'ACTIONS.DELETE',
cancelKey: 'ACTIONS.CANCEL',
titleKey: 'USER.DIALOG.DELETE_TITLE',
descriptionParam: this.user.human ??
this.user.machine ? { displayName: this.user.machine?.name } : { displayName: '' },
descriptionKey: 'USER.DIALOG.DELETE_DESCRIPTION',
},
width: '400px',

View File

@@ -126,7 +126,7 @@
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let user">
<button [disabled]="(['user.delete$', 'user.delete:'+user.id] | hasRole | async) == false"
color="warn" mat-icon-button matTooltip="{{'IAM.VIEWS.DELETE' | translate}}"
color="warn" mat-icon-button matTooltip="{{'USER.PAGES.DELETE' | translate}}"
(click)="deleteUser(user)">
<i class="las la-trash"></i>
</button>

View File

@@ -8,6 +8,7 @@
td,
th {
padding: .5rem;
outline: none;
&:first-child {
padding-left: 0;
@@ -27,8 +28,6 @@
}
tr {
outline: none;
button {
visibility: hidden;
}

View File

@@ -152,7 +152,6 @@ export class UserTableComponent implements OnInit {
confirmKey: 'ACTIONS.DELETE',
cancelKey: 'ACTIONS.CANCEL',
titleKey: 'USER.DIALOG.DELETE_TITLE',
descriptionParam: user.human ?? user.machine ? { displayName: user.machine?.name } : { displayName: '' },
descriptionKey: 'USER.DIALOG.DELETE_DESCRIPTION',
},
width: '400px',