mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-01 11:52:15 +00:00
fix(console): text color shades, ui fixes, state handle restore (#3698)
* common project grant dialog, info box, label policy * text styles, statehandler fix * dialog, btn alignment, i18n * search-user theme colors * filter formfield sizing * redirect uris * shortcut layout * settings grid type rest, shortcuts linking * login policy, reset button consistency, metadata * permission checks
This commit is contained in:
@@ -63,6 +63,11 @@
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.filter-select-method .mat-select {
|
||||
height: 36px;
|
||||
padding: 7px 10px;
|
||||
}
|
||||
|
||||
.subquery {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -82,6 +87,8 @@
|
||||
}
|
||||
|
||||
.filter-input-value {
|
||||
flex: 1;
|
||||
|
||||
input {
|
||||
height: 36px;
|
||||
font-size: 15px;
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
margin: 0.5rem 0;
|
||||
|
||||
a {
|
||||
color: map-get($foreground, base);
|
||||
color: map-get($foreground, text);
|
||||
text-decoration: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
.org-link {
|
||||
font-size: 14px;
|
||||
color: map-get($foreground, base);
|
||||
color: map-get($foreground, text);
|
||||
text-decoration: none;
|
||||
padding: 0.5rem 0.75rem 0.5rem 0.75rem;
|
||||
height: 2.5rem;
|
||||
@@ -90,7 +90,7 @@
|
||||
.org-switch-button {
|
||||
font-weight: bold;
|
||||
border: none;
|
||||
color: map-get($foreground, base);
|
||||
color: map-get($foreground, text);
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
svg {
|
||||
opacity: 0.7;
|
||||
fill: map-get($foreground, base);
|
||||
fill: map-get($foreground, text);
|
||||
height: 1.25rem;
|
||||
width: 1.25rem;
|
||||
}
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
.breadcrumb-link {
|
||||
font-size: 14px;
|
||||
color: map-get($foreground, base);
|
||||
color: map-get($foreground, text);
|
||||
text-decoration: none;
|
||||
padding: 0.5rem 0.75rem 0.5rem 0.75rem;
|
||||
height: 2.5rem;
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
color: map-get($foreground, base);
|
||||
color: map-get($foreground, text);
|
||||
|
||||
&.top-left {
|
||||
&::before {
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
padding-right: 1rem;
|
||||
font-size: 14px;
|
||||
margin: 0.5rem 0;
|
||||
box-shadow: 0 2px 5px rgb(0 0 0 / 10%);
|
||||
|
||||
&.fit {
|
||||
width: fit-content;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<h1 mat-dialog-title>
|
||||
<span>{{data.titleKey | translate}} {{data?.number}}</span>
|
||||
<span>{{ data.titleKey | translate }} {{ data?.number }}</span>
|
||||
</h1>
|
||||
<p class="desc cnsl-secondary-text">{{data.descKey | translate}}</p>
|
||||
<p class="desc cnsl-secondary-text">{{ data.descKey | translate }}</p>
|
||||
<div mat-dialog-content>
|
||||
<cnsl-form-field class="formfield">
|
||||
<cnsl-label>{{ data.labelKey | translate }}</cnsl-label>
|
||||
@@ -9,12 +9,11 @@
|
||||
</cnsl-form-field>
|
||||
</div>
|
||||
<div mat-dialog-actions class="action">
|
||||
<button color="primary" mat-stroked-button class="ok-button" (click)="closeDialog()">
|
||||
{{'ACTIONS.CLOSE' | translate}}
|
||||
<button color="primary" mat-stroked-button (click)="closeDialog()">
|
||||
{{ 'ACTIONS.CLOSE' | translate }}
|
||||
</button>
|
||||
|
||||
<button [disabled]="!name" cdkFocusInitial color="primary" mat-raised-button class="ok-button"
|
||||
(click)="closeDialog(name)">
|
||||
{{'ACTIONS.RENAME' | translate}}
|
||||
<button [disabled]="!name" cdkFocusInitial color="primary" mat-raised-button (click)="closeDialog(name)">
|
||||
{{ 'ACTIONS.RENAME' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,10 +15,6 @@ h1 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.ok-button {
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
@@ -1,25 +1,29 @@
|
||||
<div class="paginator-wrapper">
|
||||
<div class="col">
|
||||
<p class="length"><span>{{length}} </span>{{'PAGINATOR.COUNT' | translate}}</p>
|
||||
<p class="length">
|
||||
<span>{{ length }} </span>{{ 'PAGINATOR.COUNT' | translate }}
|
||||
</p>
|
||||
<p class="ts cnsl-secondary-text" *ngIf="timestamp">
|
||||
{{(timestamp | timestampToDate)| localizedDate: 'EEEE dd. MMM YYYY, HH:mm'}}
|
||||
{{ timestamp | timestampToDate | localizedDate: 'EEEE dd. MMM YYYY, HH:mm' }}
|
||||
</p>
|
||||
</div>
|
||||
<span class="fill-space"></span>
|
||||
<span class="pos cnsl-secondary-text" *ngIf="!hidePagination">{{pageIndex * pageSize}} - {{pageIndex * pageSize +
|
||||
pageSize}} </span>
|
||||
<span class="pos cnsl-secondary-text" *ngIf="!hidePagination"
|
||||
>{{ pageIndex * pageSize }} - {{ pageIndex * pageSize + pageSize }}
|
||||
</span>
|
||||
<div class="row" *ngIf="!hidePagination">
|
||||
<cnsl-form-field class="size" appearance="outline">
|
||||
<mat-select [(ngModel)]="pageSize" (selectionChange)="emitChange()">
|
||||
<mat-select class="paginator-select" [(ngModel)]="pageSize" (selectionChange)="emitChange()">
|
||||
<mat-option *ngFor="let sizeOption of pageSizeOptions" [value]="sizeOption">
|
||||
{{sizeOption}}
|
||||
{{ sizeOption }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</cnsl-form-field>
|
||||
<button *ngIf="previousPossible" (click)="previous()" [disabled]="!previousPossible"
|
||||
mat-stroked-button>{{'PAGINATOR.PREVIOUS' |
|
||||
translate}}</button>
|
||||
<button *ngIf="nextPossible" (click)="next()" [disabled]="!nextPossible" mat-stroked-button>{{'PAGINATOR.NEXT' |
|
||||
translate}}</button>
|
||||
<button *ngIf="previousPossible" (click)="previous()" [disabled]="!previousPossible" mat-stroked-button>
|
||||
{{ 'PAGINATOR.PREVIOUS' | translate }}
|
||||
</button>
|
||||
<button *ngIf="nextPossible" (click)="next()" [disabled]="!nextPossible" mat-stroked-button>
|
||||
{{ 'PAGINATOR.NEXT' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
}
|
||||
|
||||
/* stylelint-disable */
|
||||
::ng-deep .mat-select {
|
||||
::ng-deep .paginator-select.mat-select {
|
||||
min-width: 60px;
|
||||
height: 36px !important;
|
||||
padding-top: 8px !important;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<h1 mat-dialog-title class="title">
|
||||
<h1 class="title">
|
||||
<span>{{ data.title | translate }}</span>
|
||||
</h1>
|
||||
<div mat-dialog-content>
|
||||
|
||||
+2
-1
@@ -1,9 +1,10 @@
|
||||
.title {
|
||||
font-size: 1.5rem;
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 14px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.form-field {
|
||||
|
||||
+1
@@ -19,6 +19,7 @@ export class DialogAddTypeComponent {
|
||||
|
||||
constructor(public dialogRef: MatDialogRef<DialogAddTypeComponent>, @Inject(MAT_DIALOG_DATA) public data: any) {
|
||||
this.availableMfaTypes = data.types;
|
||||
this.newMfaType = data.types && data.types[0] ? data.types[0] : undefined;
|
||||
}
|
||||
|
||||
public closeDialog(): void {
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
<button
|
||||
mat-stroked-button
|
||||
class="new-mfa cnsl-action-button"
|
||||
[disabled]="disabled"
|
||||
[disabled]="disabled || availableSelection.length === 0"
|
||||
(click)="!disabled ? addMfa() : null"
|
||||
>
|
||||
<mat-icon class="icon">add</mat-icon>
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
display: block;
|
||||
|
||||
&:not(:hover) {
|
||||
color: var(--grey);
|
||||
color: map-get($foreground, secondary-text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+14
-16
@@ -105,27 +105,12 @@ export class FactorTableComponent implements OnInit {
|
||||
}
|
||||
|
||||
public addMfa(): void {
|
||||
let selection: any[] = [];
|
||||
|
||||
if (this.componentType === LoginMethodComponentType.MultiFactor) {
|
||||
selection = [MultiFactorType.MULTI_FACTOR_TYPE_U2F_WITH_VERIFICATION];
|
||||
} else if (this.componentType === LoginMethodComponentType.SecondFactor) {
|
||||
selection = [SecondFactorType.SECOND_FACTOR_TYPE_U2F, SecondFactorType.SECOND_FACTOR_TYPE_OTP];
|
||||
}
|
||||
|
||||
this.mfas.forEach((mfa) => {
|
||||
const index = selection.findIndex((sel) => sel === mfa);
|
||||
if (index > -1) {
|
||||
selection.splice(index, 1);
|
||||
}
|
||||
});
|
||||
|
||||
const dialogRef = this.dialog.open(DialogAddTypeComponent, {
|
||||
data: {
|
||||
title: 'MFA.CREATE.TITLE',
|
||||
desc: 'MFA.CREATE.DESCRIPTION',
|
||||
componentType: this.componentType,
|
||||
types: selection,
|
||||
types: this.availableSelection,
|
||||
},
|
||||
width: '400px',
|
||||
});
|
||||
@@ -244,4 +229,17 @@ export class FactorTableComponent implements OnInit {
|
||||
this.getData();
|
||||
}, to);
|
||||
}
|
||||
|
||||
public get availableSelection(): Array<MultiFactorType | SecondFactorType> {
|
||||
const allTypes: MultiFactorType[] | SecondFactorType[] =
|
||||
this.componentType === LoginMethodComponentType.MultiFactor
|
||||
? [MultiFactorType.MULTI_FACTOR_TYPE_U2F_WITH_VERIFICATION]
|
||||
: this.componentType === LoginMethodComponentType.SecondFactor
|
||||
? [SecondFactorType.SECOND_FACTOR_TYPE_U2F, SecondFactorType.SECOND_FACTOR_TYPE_OTP]
|
||||
: [];
|
||||
|
||||
const filtered = (allTypes as Array<MultiFactorType | SecondFactorType>).filter((type) => !this.mfas.includes(type));
|
||||
|
||||
return filtered;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,6 @@ export class LoginPolicyComponent implements OnInit {
|
||||
)
|
||||
.pipe(take(1))
|
||||
.subscribe((allowed) => {
|
||||
console.log(allowed);
|
||||
if (allowed) {
|
||||
this.lifetimeForm.enable();
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</cnsl-form-field>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div class="message-text-content">
|
||||
<cnsl-edit-text
|
||||
[chips]="chips[currentType]"
|
||||
[disabled]="(canWrite$ | async) === false"
|
||||
@@ -43,7 +43,7 @@
|
||||
></cnsl-edit-text>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<div class="message-text-actions">
|
||||
<button
|
||||
class="reset-button"
|
||||
*ngIf="(getCustomInitMessageTextMap$ | async) && (getCustomInitMessageTextMap$ | async)?.isDefault === false"
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
.content {
|
||||
.message-text-content {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.actions {
|
||||
.message-text-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 1rem;
|
||||
|
||||
+13
-18
@@ -1,11 +1,19 @@
|
||||
<!-- <cnsl-card
|
||||
title="{{ 'POLICY.PWD_LOCKOUT.TITLE' | translate }}"
|
||||
description="{{ 'POLICY.PWD_LOCKOUT.DESCRIPTION' | translate }}"
|
||||
> -->
|
||||
<h2>{{ 'POLICY.PWD_LOCKOUT.TITLE' | translate }}</h2>
|
||||
<p class="cnsl-secondary-text">{{ 'POLICY.PWD_LOCKOUT.DESCRIPTION' | translate }}</p>
|
||||
|
||||
<cnsl-info-section class="default" *ngIf="isDefault"> {{ 'POLICY.DEFAULTLABEL' | translate }}</cnsl-info-section>
|
||||
<ng-template cnslHasRole [hasRole]="['policy.delete']">
|
||||
<button
|
||||
*ngIf="serviceType === PolicyComponentServiceType.MGMT && !isDefault"
|
||||
matTooltip="{{ 'POLICY.RESET' | translate }}"
|
||||
color="warn"
|
||||
(click)="resetPolicy()"
|
||||
mat-stroked-button
|
||||
>
|
||||
{{ 'POLICY.RESET' | translate }}
|
||||
</button>
|
||||
</ng-template>
|
||||
|
||||
<!-- <cnsl-info-section class="default" *ngIf="isDefault"> {{ 'POLICY.DEFAULTLABEL' | translate }}</cnsl-info-section> -->
|
||||
|
||||
<cnsl-card *ngIf="lockoutData">
|
||||
<div class="lockout-content">
|
||||
@@ -38,17 +46,4 @@
|
||||
>
|
||||
{{ 'ACTIONS.SAVE' | translate }}
|
||||
</button>
|
||||
|
||||
<ng-template cnslHasRole [hasRole]="['policy.delete']">
|
||||
<button
|
||||
*ngIf="serviceType === PolicyComponentServiceType.MGMT && !isDefault"
|
||||
matTooltip="{{ 'POLICY.RESET' | translate }}"
|
||||
color="warn"
|
||||
(click)="resetPolicy()"
|
||||
mat-stroked-button
|
||||
>
|
||||
{{ 'POLICY.RESET' | translate }}
|
||||
</button>
|
||||
</ng-template>
|
||||
</div>
|
||||
<!-- </cnsl-card> -->
|
||||
|
||||
@@ -1,7 +1,21 @@
|
||||
<h2>{{ 'POLICY.PRIVACY_POLICY.TITLE' | translate }}</h2>
|
||||
<p class="cnsl-secondary-text">{{ 'POLICY.PRIVACY_POLICY.DESCRIPTION' | translate }}</p>
|
||||
|
||||
<cnsl-info-section *ngIf="isDefault"> {{ 'POLICY.DEFAULTLABEL' | translate }}</cnsl-info-section>
|
||||
<ng-container *ngIf="serviceType === PolicyComponentServiceType.MGMT && !isDefault">
|
||||
<ng-template cnslHasRole [hasRole]="['policy.delete']">
|
||||
<button
|
||||
color="primary"
|
||||
matTooltip="{{ 'POLICY.RESET' | translate }}"
|
||||
color="warn"
|
||||
(click)="resetDefault()"
|
||||
mat-stroked-button
|
||||
>
|
||||
{{ 'POLICY.RESET' | translate }}
|
||||
</button>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
|
||||
<!-- <cnsl-info-section *ngIf="isDefault"> {{ 'POLICY.DEFAULTLABEL' | translate }}</cnsl-info-section> -->
|
||||
|
||||
<div>
|
||||
<form *ngIf="form" [formGroup]="form" class="policy-content">
|
||||
@@ -26,17 +40,6 @@
|
||||
</div>
|
||||
|
||||
<div class="policy-actions">
|
||||
<button
|
||||
*ngIf="privacyPolicy && privacyPolicy.isDefault === false"
|
||||
class="reset-button"
|
||||
[disabled]="(canWrite$ | async) === false"
|
||||
(click)="resetDefault()"
|
||||
color="warn"
|
||||
type="submit"
|
||||
mat-stroked-button
|
||||
>
|
||||
<i class="las la-history"></i> {{ 'ACTIONS.RESETDEFAULT' | translate }}
|
||||
</button>
|
||||
<button
|
||||
class="save-button"
|
||||
[disabled]="(canWrite$ | async) === false"
|
||||
|
||||
@@ -61,18 +61,8 @@
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
|
||||
.save-button,
|
||||
.reset-button {
|
||||
.save-button {
|
||||
display: block;
|
||||
margin: 0 1rem 0 0;
|
||||
}
|
||||
|
||||
.reset-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
i {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
pointer-events: none;
|
||||
border-radius: 0.5rem;
|
||||
transform: scale(0.9);
|
||||
color: map-get($foreground, base);
|
||||
color: map-get($foreground, text);
|
||||
|
||||
* {
|
||||
pointer-events: none;
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@
|
||||
<ng-template cnslHasRole [hasRole]="['policy.delete']">
|
||||
<button
|
||||
class="pl-action-button"
|
||||
*ngIf="view === View.CURRENT && serviceType === PolicyComponentServiceType.MGMT && !isDefault"
|
||||
*ngIf="serviceType === PolicyComponentServiceType.MGMT && !isDefault"
|
||||
matTooltip="{{ 'POLICY.RESET' | translate }}"
|
||||
color="warn"
|
||||
(click)="removePolicy()"
|
||||
|
||||
+5
@@ -93,6 +93,11 @@
|
||||
.pl-action-button {
|
||||
align-self: flex-start;
|
||||
margin-top: 0.5rem;
|
||||
margin-right: 0.5rem;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+16
-11
@@ -1,20 +1,25 @@
|
||||
<h1 class="title">{{'PROJECT.PAGES.PRIVATELABEL.DIALOG.TITLE' | translate}} {{data?.number}}</h1>
|
||||
<p class="desc cnsl-secondary-text">{{'PROJECT.PAGES.PRIVATELABEL.DIALOG.DESCRIPTION' | translate}}</p>
|
||||
<h1 class="title">{{ 'PROJECT.PAGES.PRIVATELABEL.DIALOG.TITLE' | translate }} {{ data?.number }}</h1>
|
||||
<p class="desc cnsl-secondary-text">{{ 'PROJECT.PAGES.PRIVATELABEL.DIALOG.DESCRIPTION' | translate }}</p>
|
||||
<div mat-dialog-content>
|
||||
<mat-radio-group class="example-radio-group" [(ngModel)]="setting">
|
||||
<mat-radio-group class="project-radio-group" [(ngModel)]="setting">
|
||||
<mat-radio-button class="radio-button" *ngFor="let selection of settings" [value]="selection">
|
||||
<span class="label">{{'PROJECT.PAGES.PRIVATELABEL.'+selection+'.TITLE' | translate}}</span>
|
||||
<span class="label">{{ 'PROJECT.PAGES.PRIVATELABEL.' + selection + '.TITLE' | translate }}</span>
|
||||
</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<cnsl-info-section class="info">{{'PROJECT.PAGES.PRIVATELABEL.'+setting+'.DESC' | translate}}</cnsl-info-section>
|
||||
<cnsl-info-section class="info">{{ 'PROJECT.PAGES.PRIVATELABEL.' + setting + '.DESC' | translate }}</cnsl-info-section>
|
||||
</div>
|
||||
<div mat-dialog-actions class="action">
|
||||
<button cdkFocusInitial mat-stroked-button class="ok-button" (click)="closeDialog()">
|
||||
{{'ACTIONS.CLOSE' | translate}}
|
||||
<button cdkFocusInitial mat-stroked-button (click)="closeDialog()">
|
||||
{{ 'ACTIONS.CLOSE' | translate }}
|
||||
</button>
|
||||
|
||||
<button [disabled]="setting === undefined" cdkFocusInitial color="primary" mat-raised-button class="ok-button"
|
||||
(click)="closeDialog(setting)">
|
||||
{{'ACTIONS.OK' | translate}}
|
||||
<button
|
||||
[disabled]="setting === undefined"
|
||||
cdkFocusInitial
|
||||
color="primary"
|
||||
mat-raised-button
|
||||
(click)="closeDialog(setting)"
|
||||
>
|
||||
{{ 'ACTIONS.OK' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+9
-8
@@ -7,11 +7,16 @@
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.radio-button {
|
||||
margin: 0.5rem 0;
|
||||
.project-radio-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.label {
|
||||
white-space: normal;
|
||||
.radio-button {
|
||||
margin: 0.5rem 0;
|
||||
|
||||
.label {
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,10 +29,6 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.ok-button {
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
+9
-6
@@ -1,5 +1,4 @@
|
||||
<div class="found" *ngIf="users.length > 0">
|
||||
<!-- <span class="found-label cnsl-secondary-text">{{'USER.SEARCH.FOUND' | translate}}:</span> -->
|
||||
<div class="user-autocomplete-found" *ngIf="users.length > 0">
|
||||
<div class="found-user-row" *ngFor="let user of users; index as i">
|
||||
<div class="circle">
|
||||
<cnsl-avatar
|
||||
@@ -109,9 +108,11 @@
|
||||
</mat-option>
|
||||
</mat-autocomplete>
|
||||
|
||||
<span class="target-desc">
|
||||
<span class="user-autocomplete-target-desc">
|
||||
{{ 'USER.TARGET.SELF' | translate }}
|
||||
<a (click)="changeTarget()">{{ 'USER.TARGET.CLICKHERE' | translate }}</a>
|
||||
<a (click)="changeTarget()"
|
||||
><strong>{{ 'USER.TARGET.CLICKHERE' | translate }}</strong></a
|
||||
>
|
||||
</span>
|
||||
</cnsl-form-field>
|
||||
</div>
|
||||
@@ -122,9 +123,11 @@
|
||||
<cnsl-form-field class="user-create-form-field more-space">
|
||||
<cnsl-label>{{ 'USER.SEARCH.ADDITIONAL-EXTERNAL' | translate }}</cnsl-label>
|
||||
<input cnslInput type="text" [formControl]="globalLoginNameControl" placeholder="[email protected]" />
|
||||
<span class="target-desc">
|
||||
<span class="user-autocomplete-target-desc">
|
||||
{{ (target === UserTarget.SELF ? 'USER.TARGET.SELF' : 'USER.TARGET.EXTERNAL') | translate }}
|
||||
<a (click)="changeTarget()">{{ 'USER.TARGET.CLICKHERE' | translate }}</a>
|
||||
<a (click)="changeTarget()"
|
||||
><strong>{{ 'USER.TARGET.CLICKHERE' | translate }}</strong></a
|
||||
>
|
||||
</span>
|
||||
</cnsl-form-field>
|
||||
|
||||
|
||||
+74
-64
@@ -1,15 +1,79 @@
|
||||
.target-desc {
|
||||
font-size: 14px;
|
||||
display: block;
|
||||
margin-top: 0.5rem;
|
||||
@use '@angular/material' as mat;
|
||||
|
||||
a {
|
||||
color: #4072b4;
|
||||
@mixin search-user-autocomplete-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
$primary-color: mat.get-color-from-palette($primary, 500);
|
||||
$background: map-get($theme, background);
|
||||
$foreground: map-get($theme, foreground);
|
||||
$secondary-text: map-get($foreground, secondary-text);
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
color: #6992c9;
|
||||
text-decoration: underline;
|
||||
.user-autocomplete-found {
|
||||
margin: 0.5rem 0;
|
||||
border-radius: 0.5rem;
|
||||
padding: 0.5rem 0;
|
||||
max-width: 500px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.add-user-row {
|
||||
margin-left: -4px;
|
||||
}
|
||||
|
||||
.found-user-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.25rem 0;
|
||||
|
||||
button {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
button {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.found-label {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.user-name-column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
.smaller {
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.fill-space {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.search-user-dl-btn {
|
||||
transition: color 0.2s ease;
|
||||
|
||||
&:not(:hover) {
|
||||
color: $secondary-text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.user-autocomplete-target-desc {
|
||||
font-size: 14px;
|
||||
display: block;
|
||||
margin-top: 0.5rem;
|
||||
|
||||
a {
|
||||
color: $primary-color;
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
color: mat.get-color-from-palette($primary, 400);
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,60 +100,6 @@
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.found {
|
||||
margin: 0.5rem 0;
|
||||
border-radius: 0.5rem;
|
||||
padding: 0.5rem 0;
|
||||
max-width: 500px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.add-user-row {
|
||||
margin-left: -4px;
|
||||
}
|
||||
|
||||
.found-user-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.25rem 0;
|
||||
|
||||
button {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
button {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.found-label {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.user-name-column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
.smaller {
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.fill-space {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.search-user-dl-btn {
|
||||
transition: color 0.2s ease;
|
||||
|
||||
&:not(:hover) {
|
||||
color: var(--grey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.circle {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@ export interface SettingLinks {
|
||||
i18nTitle: string;
|
||||
i18nDesc: string;
|
||||
iamRouterLink: any;
|
||||
orgRouterLink: any;
|
||||
orgRouterLink?: any;
|
||||
queryParams: any;
|
||||
iamWithRole: string[];
|
||||
orgWithRole: string[];
|
||||
iamWithRole?: string[];
|
||||
orgWithRole?: string[];
|
||||
icon?: string;
|
||||
svgIcon?: string;
|
||||
color: string;
|
||||
@@ -49,12 +49,10 @@ export const PRIVACY_POLICY: SettingLinks = {
|
||||
|
||||
export const NOTIFICATION_GROUP: SettingLinks = {
|
||||
i18nTitle: 'SETTINGS.GROUPS.NOTIFICATIONS',
|
||||
i18nDesc: '',
|
||||
i18nDesc: 'SETTINGS.LIST.NOTIFICATIONS_DESC',
|
||||
iamRouterLink: ['/settings'],
|
||||
orgRouterLink: ['/org-settings'],
|
||||
queryParams: { id: 'notifications' },
|
||||
iamWithRole: ['iam.policy.read'],
|
||||
orgWithRole: ['policy.read'],
|
||||
icon: 'las la-bell',
|
||||
color: 'red',
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { animate, style, transition, trigger } from '@angular/animations';
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum';
|
||||
|
||||
import { SETTINGLINKS, SettingLinks } from './settinglinks';
|
||||
@@ -35,9 +35,15 @@ import { SETTINGLINKS, SettingLinks } from './settinglinks';
|
||||
]),
|
||||
],
|
||||
})
|
||||
export class SettingsGridComponent {
|
||||
export class SettingsGridComponent implements OnInit {
|
||||
@Input() public type!: PolicyComponentServiceType;
|
||||
@Input() public tag: string = '';
|
||||
public PolicyComponentServiceType: any = PolicyComponentServiceType;
|
||||
public SETTINGS: SettingLinks[] = SETTINGLINKS;
|
||||
|
||||
ngOnInit(): void {
|
||||
this.SETTINGS = this.SETTINGS.filter((setting) =>
|
||||
this.type === PolicyComponentServiceType.MGMT ? !!setting.orgRouterLink : !!setting.iamRouterLink,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,99 +1,132 @@
|
||||
<div cdkDropListGroup>
|
||||
<div class="shortcut-container">
|
||||
<div class="shortcut-title-container">
|
||||
<h2>{{'HOME.SHORTCUTS.SHORTCUTS' | translate}}</h2>
|
||||
<button [matTooltip]="(editState ? 'ACTIONS.CLOSE' : 'ACTIONS.EDIT') | translate" class="shortcut-btn"
|
||||
(click)="editState = !editState" mat-icon-button>
|
||||
<i *ngIf="!editState" class=" las la-pen"></i>
|
||||
<mat-icon *ngIf="editState">close</mat-icon>
|
||||
<h2>{{ 'HOME.SHORTCUTS.SHORTCUTS' | translate }}</h2>
|
||||
<button
|
||||
[matTooltip]="(editState ? 'ACTIONS.SAVE' : 'ACTIONS.EDIT') | translate"
|
||||
class="shortcut-btn"
|
||||
(click)="editState = !editState"
|
||||
mat-icon-button
|
||||
>
|
||||
<i *ngIf="!editState" class="las la-pen"></i>
|
||||
<i *ngIf="editState" class="las la-check"></i>
|
||||
</button>
|
||||
<button matTooltip="{{'ACTIONS.RESETDEFAULT' | translate}}" (click)="reset()" *ngIf="editState" mat-icon-button>
|
||||
<button matTooltip="{{ 'ACTIONS.RESETDEFAULT' | translate }}" (click)="reset()" *ngIf="editState" mat-icon-button>
|
||||
<i *ngIf="editState" class="las la-undo-alt"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="shortcut-list-row">
|
||||
<div cdkDropList [cdkDropListData]="main" class="shortcut-list" (cdkDropListDropped)="drop($event, 'main')">
|
||||
<p *ngIf="editState" class="shortcut-desc">{{'HOME.SHORTCUTS.REORDER' | translate}}</p>
|
||||
<p *ngIf="editState" class="shortcut-desc cnsl-secondary-text">{{ 'HOME.SHORTCUTS.REORDER' | translate }}</p>
|
||||
<ng-container *ngFor="let shortcut of main">
|
||||
<ng-template cnslHasRole [hasRole]="shortcut.withRole">
|
||||
<a [routerLink]="!editState ? shortcut.routerLink : null" class="shortcut-box"
|
||||
[ngClass]="{'edit-state': editState && !shortcut.disabled, 'disabled': editState && shortcut.disabled}"
|
||||
cdkDrag [cdkDragDisabled]="shortcut.disabled || !editState">
|
||||
<div class="shortcuts-avatar {{shortcut.color}}">
|
||||
<a
|
||||
[routerLink]="!editState ? shortcut.routerLink : null"
|
||||
[queryParams]="shortcut.queryParams ? shortcut.queryParams : null"
|
||||
class="shortcut-box"
|
||||
[ngClass]="{ 'edit-state': editState && !shortcut.disabled, disabled: editState && shortcut.disabled }"
|
||||
cdkDrag
|
||||
[cdkDragDisabled]="shortcut.disabled || !editState"
|
||||
>
|
||||
<div class="shortcuts-avatar {{ shortcut.color }}">
|
||||
<mat-icon *ngIf="shortcut.svgIcon" class="icon" [svgIcon]="shortcut.svgIcon"></mat-icon>
|
||||
<i *ngIf="shortcut.icon" class="icon {{shortcut.icon}}"></i>
|
||||
<span *ngIf="shortcut.label" class="shortcuts-avatar-label">{{shortcut.label}}</span>
|
||||
<i *ngIf="shortcut.icon" class="icon {{ shortcut.icon }}"></i>
|
||||
<span *ngIf="shortcut.label" class="shortcuts-avatar-label">{{ shortcut.label }}</span>
|
||||
</div>
|
||||
<div class="shortcut-col">
|
||||
<span *ngIf="shortcut.i18nTitle">{{shortcut.i18nTitle | translate}}</span>
|
||||
<span *ngIf="shortcut.title">{{shortcut.title}}</span>
|
||||
<span *ngIf="shortcut.i18nTitle">{{ shortcut.i18nTitle | translate }}</span>
|
||||
<span *ngIf="shortcut.title">{{ shortcut.title }}</span>
|
||||
</div>
|
||||
|
||||
<span class="fill-space"></span>
|
||||
|
||||
<div class="shortcut-state-dot" *ngIf="shortcut && shortcut.state !== undefined"
|
||||
matTooltip="{{'PROJECT.STATE.'+shortcut.state | translate}}"
|
||||
[ngClass]="{'active': shortcut.state === ProjectState.PROJECT_STATE_ACTIVE, 'inactive': shortcut.state === ProjectState.PROJECT_STATE_INACTIVE }">
|
||||
</div>
|
||||
<div
|
||||
class="shortcut-state-dot"
|
||||
*ngIf="shortcut && shortcut.state !== undefined"
|
||||
matTooltip="{{ 'PROJECT.STATE.' + shortcut.state | translate }}"
|
||||
[ngClass]="{
|
||||
active: shortcut.state === ProjectState.PROJECT_STATE_ACTIVE,
|
||||
inactive: shortcut.state === ProjectState.PROJECT_STATE_INACTIVE
|
||||
}"
|
||||
></div>
|
||||
</a>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<div cdkDropList [cdkDropListData]="secondary" class="shortcut-list"
|
||||
(cdkDropListDropped)="drop($event, 'secondary')">
|
||||
<p *ngIf="editState" class="shortcut-desc">{{'HOME.SHORTCUTS.REORDER' | translate}}</p>
|
||||
<div cdkDropList [cdkDropListData]="secondary" class="shortcut-list" (cdkDropListDropped)="drop($event, 'secondary')">
|
||||
<p *ngIf="editState" class="shortcut-desc cnsl-secondary-text">{{ 'HOME.SHORTCUTS.REORDER' | translate }}</p>
|
||||
<ng-container *ngFor="let shortcut of secondary">
|
||||
<ng-template cnslHasRole [hasRole]="shortcut.withRole">
|
||||
<a [routerLink]="!editState ? shortcut.routerLink : null" class="shortcut-box"
|
||||
[ngClass]="{'edit-state': editState && !shortcut.disabled}" cdkDrag
|
||||
[cdkDragDisabled]="shortcut.disabled || !editState">
|
||||
<div class="shortcuts-avatar {{shortcut.color}}">
|
||||
<a
|
||||
[routerLink]="!editState ? shortcut.routerLink : null"
|
||||
[queryParams]="shortcut.queryParams ? shortcut.queryParams : null"
|
||||
class="shortcut-box"
|
||||
[ngClass]="{ 'edit-state': editState && !shortcut.disabled }"
|
||||
cdkDrag
|
||||
[cdkDragDisabled]="shortcut.disabled || !editState"
|
||||
>
|
||||
<div class="shortcuts-avatar {{ shortcut.color }}">
|
||||
<mat-icon *ngIf="shortcut.svgIcon" class="icon" [svgIcon]="shortcut.svgIcon"></mat-icon>
|
||||
<i *ngIf="shortcut.icon" class="icon {{shortcut.icon}}"></i>
|
||||
<span *ngIf="shortcut.label" class="shortcuts-avatar-label">{{shortcut.label}}</span>
|
||||
<i *ngIf="shortcut.icon" class="icon {{ shortcut.icon }}"></i>
|
||||
<span *ngIf="shortcut.label" class="shortcuts-avatar-label">{{ shortcut.label }}</span>
|
||||
</div>
|
||||
<div class="shortcut-col">
|
||||
<span *ngIf="shortcut.i18nTitle">{{shortcut.i18nTitle | translate}}</span>
|
||||
<span *ngIf="shortcut.title">{{shortcut.title}}</span>
|
||||
<span *ngIf="shortcut.i18nTitle">{{ shortcut.i18nTitle | translate }}</span>
|
||||
<span *ngIf="shortcut.title">{{ shortcut.title }}</span>
|
||||
</div>
|
||||
|
||||
<span class="fill-space"></span>
|
||||
|
||||
<div class="shortcut-state-dot" *ngIf="shortcut && shortcut.state !== undefined"
|
||||
matTooltip="{{'PROJECT.STATE.'+shortcut.state | translate}}"
|
||||
[ngClass]="{'active': shortcut.state === ProjectState.PROJECT_STATE_ACTIVE, 'inactive': shortcut.state === ProjectState.PROJECT_STATE_INACTIVE }">
|
||||
</div>
|
||||
<div
|
||||
class="shortcut-state-dot"
|
||||
*ngIf="shortcut && shortcut.state !== undefined"
|
||||
matTooltip="{{ 'PROJECT.STATE.' + shortcut.state | translate }}"
|
||||
[ngClass]="{
|
||||
active: shortcut.state === ProjectState.PROJECT_STATE_ACTIVE,
|
||||
inactive: shortcut.state === ProjectState.PROJECT_STATE_INACTIVE
|
||||
}"
|
||||
></div>
|
||||
</a>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<div cdkDropList [cdkDropListData]="third" class="shortcut-list" (cdkDropListDropped)="drop($event, 'third')">
|
||||
<p *ngIf="editState" class="shortcut-desc">{{'HOME.SHORTCUTS.REORDER' | translate}}</p>
|
||||
<p *ngIf="editState" class="shortcut-desc cnsl-secondary-text">{{ 'HOME.SHORTCUTS.REORDER' | translate }}</p>
|
||||
<ng-container *ngFor="let shortcut of third">
|
||||
<ng-template cnslHasRole [hasRole]="shortcut.withRole">
|
||||
<a [routerLink]="!editState ? shortcut.routerLink : null" class="shortcut-box"
|
||||
[ngClass]="{'edit-state': editState && !shortcut.disabled}" cdkDrag
|
||||
[cdkDragDisabled]="shortcut.disabled || !editState">
|
||||
<div class="shortcuts-avatar {{shortcut.color}}">
|
||||
<a
|
||||
[routerLink]="!editState ? shortcut.routerLink : null"
|
||||
[queryParams]="shortcut.queryParams ? shortcut.queryParams : null"
|
||||
class="shortcut-box"
|
||||
[ngClass]="{ 'edit-state': editState && !shortcut.disabled }"
|
||||
cdkDrag
|
||||
[cdkDragDisabled]="shortcut.disabled || !editState"
|
||||
>
|
||||
<div class="shortcuts-avatar {{ shortcut.color }}">
|
||||
<mat-icon *ngIf="shortcut.svgIcon" class="icon" [svgIcon]="shortcut.svgIcon"></mat-icon>
|
||||
<i *ngIf="shortcut.icon" class="icon {{shortcut.icon}}"></i>
|
||||
<span *ngIf="shortcut.label" class="shortcuts-avatar-label">{{shortcut.label}}</span>
|
||||
<i *ngIf="shortcut.icon" class="icon {{ shortcut.icon }}"></i>
|
||||
<span *ngIf="shortcut.label" class="shortcuts-avatar-label">{{ shortcut.label }}</span>
|
||||
</div>
|
||||
|
||||
<div class="shortcut-col">
|
||||
<span *ngIf="shortcut.i18nTitle">{{shortcut.i18nTitle | translate}}</span>
|
||||
<span *ngIf="shortcut.title">{{shortcut.title}}</span>
|
||||
<span *ngIf="shortcut.i18nTitle">{{ shortcut.i18nTitle | translate }}</span>
|
||||
<span *ngIf="shortcut.title">{{ shortcut.title }}</span>
|
||||
</div>
|
||||
|
||||
<span class="fill-space"></span>
|
||||
|
||||
<div class="shortcut-state-dot" *ngIf="shortcut && shortcut.state !== undefined"
|
||||
matTooltip="{{'PROJECT.STATE.'+shortcut.state | translate}}"
|
||||
[ngClass]="{'active': shortcut.state === ProjectState.PROJECT_STATE_ACTIVE, 'inactive': shortcut.state === ProjectState.PROJECT_STATE_INACTIVE }">
|
||||
</div>
|
||||
<div
|
||||
class="shortcut-state-dot"
|
||||
*ngIf="shortcut && shortcut.state !== undefined"
|
||||
matTooltip="{{ 'PROJECT.STATE.' + shortcut.state | translate }}"
|
||||
[ngClass]="{
|
||||
active: shortcut.state === ProjectState.PROJECT_STATE_ACTIVE,
|
||||
inactive: shortcut.state === ProjectState.PROJECT_STATE_INACTIVE
|
||||
}"
|
||||
></div>
|
||||
</a>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
@@ -102,92 +135,48 @@
|
||||
</div>
|
||||
|
||||
<div class="shortcut-container" *ngIf="editState">
|
||||
<h2>{{'HOME.SHORTCUTS.SETTINGS' | translate}}</h2>
|
||||
<h2>{{ 'HOME.SHORTCUTS.SETTINGS' | translate }}</h2>
|
||||
|
||||
<div class="shortcut-list-row">
|
||||
<div class="available-shortcut-wrapper">
|
||||
<p *ngIf="editState" class="shortcut-desc cnsl-secondary-text">{{ 'HOME.SHORTCUTS.REORDER' | translate }}</p>
|
||||
|
||||
<div cdkDropList [cdkDropListData]="allRoutes" class="shortcut-list" (cdkDropListDropped)="drop($event, 'main')">
|
||||
<p *ngIf="editState" class="shortcut-desc">{{'HOME.SHORTCUTS.REORDER' | translate}}</p>
|
||||
<ng-container *ngFor="let shortcut of allRoutes">
|
||||
<div
|
||||
cdkDropList
|
||||
[cdkDropListData]="allAvailableShortcuts"
|
||||
class="available-shortcut-list"
|
||||
(cdkDropListDropped)="drop($event, 'main')"
|
||||
>
|
||||
<ng-container *ngFor="let shortcut of allAvailableShortcuts">
|
||||
<ng-template cnslHasRole [hasRole]="shortcut.withRole">
|
||||
<div class="shortcut-box"
|
||||
[ngClass]="{'edit-state': editState && !shortcut.disabled, 'disabled': editState && shortcut.disabled}"
|
||||
cdkDrag [cdkDragDisabled]="shortcut.disabled">
|
||||
<div class="shortcuts-avatar {{shortcut.color}}">
|
||||
<div
|
||||
class="shortcut-box"
|
||||
[ngClass]="{ 'edit-state': editState && !shortcut.disabled, disabled: editState && shortcut.disabled }"
|
||||
cdkDrag
|
||||
[cdkDragDisabled]="shortcut.disabled"
|
||||
>
|
||||
<div class="shortcuts-avatar {{ shortcut.color }}">
|
||||
<mat-icon *ngIf="shortcut.svgIcon" class="icon" [svgIcon]="shortcut.svgIcon"></mat-icon>
|
||||
<i *ngIf="shortcut.icon" class="icon {{shortcut.icon}}"></i>
|
||||
<span *ngIf="shortcut.label" class="shortcuts-avatar-label">{{shortcut.label}}</span>
|
||||
<i *ngIf="shortcut.icon" class="icon {{ shortcut.icon }}"></i>
|
||||
<span *ngIf="shortcut.label" class="shortcuts-avatar-label">{{ shortcut.label }}</span>
|
||||
</div>
|
||||
<div class="shortcut-col">
|
||||
<span *ngIf="shortcut.i18nTitle">{{shortcut.i18nTitle | translate}}</span>
|
||||
<span *ngIf="shortcut.title">{{shortcut.title}}</span>
|
||||
<span class="shortcut-item-desc cnsl-secondary-text" *ngIf="shortcut.i18nDesc">{{shortcut.i18nDesc |
|
||||
translate}}</span>
|
||||
<span class="shortcut-item-desc cnsl-secondary-text" *ngIf="shortcut.desc">{{shortcut.desc}}</span>
|
||||
<span *ngIf="shortcut.i18nTitle">{{ shortcut.i18nTitle | translate }}</span>
|
||||
<span *ngIf="shortcut.title">{{ shortcut.title }}</span>
|
||||
<span class="shortcut-item-desc cnsl-secondary-text" *ngIf="shortcut.i18nDesc">{{
|
||||
shortcut.i18nDesc | translate
|
||||
}}</span>
|
||||
<span class="shortcut-item-desc cnsl-secondary-text" *ngIf="shortcut.desc">{{ shortcut.desc }}</span>
|
||||
</div>
|
||||
<span class="fill-space"></span>
|
||||
<div class="shortcut-state-dot" *ngIf="shortcut && shortcut.state !== undefined"
|
||||
matTooltip="{{'PROJECT.STATE.'+shortcut.state | translate}}"
|
||||
[ngClass]="{'active': shortcut.state === ProjectState.PROJECT_STATE_ACTIVE, 'inactive': shortcut.state === ProjectState.PROJECT_STATE_INACTIVE }">
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<div cdkDropList [cdkDropListData]="allPolicies" class="shortcut-list"
|
||||
(cdkDropListDropped)="drop($event, 'secondary')">
|
||||
<p *ngIf="editState" class="shortcut-desc">{{'HOME.SHORTCUTS.REORDER' | translate}}</p>
|
||||
<ng-container *ngFor="let shortcut of allPolicies">
|
||||
<ng-template cnslHasRole [hasRole]="shortcut.withRole">
|
||||
<div class="shortcut-box" [ngClass]="{'edit-state': editState && !shortcut.disabled}" cdkDrag
|
||||
[cdkDragDisabled]="shortcut.disabled">
|
||||
<div class="shortcuts-avatar {{shortcut.color}}">
|
||||
<mat-icon *ngIf="shortcut.svgIcon" class="icon" [svgIcon]="shortcut.svgIcon"></mat-icon>
|
||||
<i *ngIf="shortcut.icon" class="icon {{shortcut.icon}}"></i>
|
||||
<span *ngIf="shortcut.label" class="shortcuts-avatar-label">{{shortcut.label}}</span>
|
||||
</div>
|
||||
<div class="shortcut-col">
|
||||
<span *ngIf="shortcut.i18nTitle">{{shortcut.i18nTitle | translate}}</span>
|
||||
<span *ngIf="shortcut.title">{{shortcut.title}}</span>
|
||||
<span class="shortcut-item-desc cnsl-secondary-text" *ngIf="shortcut.i18nDesc">{{shortcut.i18nDesc |
|
||||
translate}}</span>
|
||||
<span class="shortcut-item-desc cnsl-secondary-text" *ngIf="shortcut.desc">{{shortcut.desc}}</span>
|
||||
</div>
|
||||
<span class="fill-space"></span>
|
||||
<div class="shortcut-state-dot" *ngIf="shortcut && shortcut.state !== undefined"
|
||||
matTooltip="{{'PROJECT.STATE.'+shortcut.state | translate}}"
|
||||
[ngClass]="{'active': shortcut.state === ProjectState.PROJECT_STATE_ACTIVE, 'inactive': shortcut.state === ProjectState.PROJECT_STATE_INACTIVE }">
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<div cdkDropList [cdkDropListData]="allProjects" class="shortcut-list"
|
||||
(cdkDropListDropped)="drop($event, 'third')">
|
||||
<p *ngIf="editState" class="shortcut-desc">{{'HOME.SHORTCUTS.REORDER' | translate}}</p>
|
||||
<ng-container *ngFor="let shortcut of allProjects">
|
||||
<ng-template cnslHasRole [hasRole]="shortcut.withRole">
|
||||
<div class="shortcut-box" [ngClass]="{'edit-state': editState && !shortcut.disabled}" cdkDrag
|
||||
[cdkDragDisabled]="shortcut.disabled">
|
||||
<div class="shortcuts-avatar {{shortcut.color}}">
|
||||
<mat-icon *ngIf="shortcut.svgIcon" class="icon" [svgIcon]="shortcut.svgIcon"></mat-icon>
|
||||
<i *ngIf="shortcut.icon" class="icon {{shortcut.icon}}"></i>
|
||||
<span *ngIf="shortcut.label" class="shortcuts-avatar-label">{{shortcut.label}}</span>
|
||||
</div>
|
||||
<div class="shortcut-col">
|
||||
<span *ngIf="shortcut.i18nTitle">{{shortcut.i18nTitle | translate}}</span>
|
||||
<span *ngIf="shortcut.title">{{shortcut.title}}</span>
|
||||
<span class="shortcut-item-desc cnsl-secondary-text" *ngIf="shortcut.i18nDesc">{{shortcut.i18nDesc |
|
||||
translate}}</span>
|
||||
<span class="shortcut-item-desc cnsl-secondary-text" *ngIf="shortcut.desc">{{shortcut.desc}}</span>
|
||||
</div>
|
||||
<span class="fill-space"></span>
|
||||
<div class="shortcut-state-dot" *ngIf="shortcut && shortcut.state !== undefined"
|
||||
matTooltip="{{'PROJECT.STATE.'+shortcut.state | translate}}"
|
||||
[ngClass]="{'active': shortcut.state === ProjectState.PROJECT_STATE_ACTIVE, 'inactive': shortcut.state === ProjectState.PROJECT_STATE_INACTIVE }">
|
||||
</div>
|
||||
<div
|
||||
class="shortcut-state-dot"
|
||||
*ngIf="shortcut && shortcut.state !== undefined"
|
||||
matTooltip="{{ 'PROJECT.STATE.' + shortcut.state | translate }}"
|
||||
[ngClass]="{
|
||||
active: shortcut.state === ProjectState.PROJECT_STATE_ACTIVE,
|
||||
inactive: shortcut.state === ProjectState.PROJECT_STATE_INACTIVE
|
||||
}"
|
||||
></div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
@@ -207,4 +196,4 @@
|
||||
<span *ngIf="shortcut.title">{{shortcut.title}}</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
</ng-template> -->
|
||||
</ng-template> -->
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
.shortcut-desc {
|
||||
align-self: center;
|
||||
font-size: 14px;
|
||||
color: var(--grey);
|
||||
margin-top: 0;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -89,7 +88,6 @@
|
||||
.shortcut-desc {
|
||||
align-self: center;
|
||||
font-size: 14px;
|
||||
color: var(--grey);
|
||||
margin-top: 0;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -209,6 +207,30 @@
|
||||
}
|
||||
}
|
||||
|
||||
.available-shortcut-wrapper {
|
||||
border: 1px solid $border-color;
|
||||
border-radius: 1rem;
|
||||
padding: 1rem;
|
||||
|
||||
.available-shortcut-list {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
grid-gap: 1rem;
|
||||
|
||||
@media only screen and (min-width: 800px) {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1200px) {
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
}
|
||||
|
||||
.shortcut-box {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cdk-drag-preview {
|
||||
box-sizing: border-box;
|
||||
border-radius: 1rem;
|
||||
|
||||
@@ -17,7 +17,8 @@ export interface ShortcutItem {
|
||||
i18nTitle?: string;
|
||||
i18nDesc?: string;
|
||||
routerLink: any;
|
||||
withRole: string[];
|
||||
queryParams?: any;
|
||||
withRole?: string[];
|
||||
icon?: string;
|
||||
label?: string;
|
||||
svgIcon?: string;
|
||||
@@ -138,8 +139,9 @@ export class ShortcutsComponent implements OnDestroy {
|
||||
type: ShortcutType.POLICY,
|
||||
i18nTitle: p.i18nTitle,
|
||||
i18nDesc: p.i18nDesc,
|
||||
routerLink: p.orgRouterLink,
|
||||
withRole: p.orgWithRole,
|
||||
routerLink: p.orgRouterLink ?? p.iamRouterLink,
|
||||
queryParams: p.queryParams,
|
||||
withRole: p.orgWithRole ?? p.iamWithRole,
|
||||
icon: p.icon ?? '',
|
||||
svgIcon: p.svgIcon ?? '',
|
||||
color: p.color ?? '',
|
||||
@@ -176,10 +178,10 @@ export class ShortcutsComponent implements OnDestroy {
|
||||
} else {
|
||||
switch (listName) {
|
||||
case 'main':
|
||||
this.main = [PROFILE_SHORTCUT, CREATE_ORG, CREATE_PROJECT, CREATE_USER];
|
||||
this.main = [PROFILE_SHORTCUT /* CREATE_ORG, CREATE_PROJECT, CREATE_USER */];
|
||||
break;
|
||||
case 'secondary':
|
||||
this.secondary = [];
|
||||
this.secondary = [CREATE_ORG, CREATE_PROJECT, CREATE_USER];
|
||||
// [LOGIN_POLICY, PRIVATELABEL_POLICY].map((p) => {
|
||||
// const policy: string = {
|
||||
// i18nTitle: p.i18nTitle,
|
||||
@@ -194,7 +196,7 @@ export class ShortcutsComponent implements OnDestroy {
|
||||
// });
|
||||
break;
|
||||
case 'third':
|
||||
this.third = [];
|
||||
this.third = this.ALL_SHORTCUTS.filter((item) => item.i18nTitle === 'SETTINGS.GROUPS.APPEARANCE');
|
||||
// [LOGIN_TEXTS_POLICY, MESSAGE_TEXTS_POLICY].map((p) => {
|
||||
// const policy: ShortcutItem = {
|
||||
// i18nTitle: p.i18nTitle,
|
||||
@@ -276,4 +278,8 @@ export class ShortcutsComponent implements OnDestroy {
|
||||
public get allProjects(): ShortcutItem[] {
|
||||
return this.all.filter((s) => s.type === ShortcutType.PROJECT);
|
||||
}
|
||||
|
||||
public get allAvailableShortcuts(): ShortcutItem[] {
|
||||
return [...this.allRoutes, ...this.allPolicies, ...this.allProjects];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,30 +1,37 @@
|
||||
<span class="title" mat-dialog-title>{{'USER.PERSONALACCESSTOKEN.ADDED.TITLE' | translate}}</span>
|
||||
<span class="title" mat-dialog-title>{{ 'USER.PERSONALACCESSTOKEN.ADDED.TITLE' | translate }}</span>
|
||||
<div mat-dialog-content>
|
||||
<cnsl-info-section [type]="InfoSectionType.WARN"> {{'USER.PERSONALACCESSTOKEN.ADDED.DESCRIPTION' | translate}}
|
||||
<cnsl-info-section [type]="InfoSectionType.WARN">
|
||||
{{ 'USER.PERSONALACCESSTOKEN.ADDED.DESCRIPTION' | translate }}
|
||||
</cnsl-info-section>
|
||||
|
||||
<ng-container *ngIf="tokenResponse">
|
||||
<div class="row">
|
||||
<p class="left">{{'USER.PERSONALACCESSTOKEN.ID' | translate}}</p>
|
||||
<p class="right">{{tokenResponse.tokenId}}</p>
|
||||
<p class="left cnsl-secondary-text">{{ 'USER.PERSONALACCESSTOKEN.ID' | translate }}</p>
|
||||
<p class="right">{{ tokenResponse.tokenId }}</p>
|
||||
</div>
|
||||
|
||||
<div class="row" *ngIf="tokenResponse.token">
|
||||
<p class="left">{{'USER.PERSONALACCESSTOKEN.TOKEN' | translate}}</p>
|
||||
<p class="left cnsl-secondary-text">{{ 'USER.PERSONALACCESSTOKEN.TOKEN' | translate }}</p>
|
||||
<div class="right">
|
||||
<button class="ctc" [disabled]="copied === tokenResponse.token"
|
||||
[matTooltip]="(copied !== tokenResponse.token ? 'ACTIONS.COPY' : 'ACTIONS.COPIED' ) | translate"
|
||||
cnslCopyToClipboard [valueToCopy]="tokenResponse.token" (copiedValue)="copied = $event" mat-icon-button>
|
||||
<button
|
||||
class="ctc"
|
||||
[disabled]="copied === tokenResponse.token"
|
||||
[matTooltip]="(copied !== tokenResponse.token ? 'ACTIONS.COPY' : 'ACTIONS.COPIED') | translate"
|
||||
cnslCopyToClipboard
|
||||
[valueToCopy]="tokenResponse.token"
|
||||
(copiedValue)="copied = $event"
|
||||
mat-icon-button
|
||||
>
|
||||
<i *ngIf="copied !== tokenResponse.token" class="las la-clipboard"></i>
|
||||
<i *ngIf="copied === tokenResponse.token" class="las la-clipboard-check"></i>
|
||||
</button>
|
||||
<span>{{tokenResponse.token}}</span>
|
||||
<span>{{ tokenResponse.token }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
<div mat-dialog-actions class="action">
|
||||
<button color="primary" mat-raised-button class="ok-button" (click)="closeDialog()">
|
||||
{{'ACTIONS.CLOSE' | translate}}
|
||||
{{ 'ACTIONS.CLOSE' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
}
|
||||
|
||||
.left {
|
||||
color: var(--grey);
|
||||
margin-right: 1rem;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
padding: 0.75rem 0;
|
||||
font-size: 15px;
|
||||
cursor: pointer;
|
||||
color: map-get($foreground, base);
|
||||
color: map-get($foreground, text);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
opacity: 0.6;
|
||||
font-size: 15px;
|
||||
cursor: pointer;
|
||||
color: map-get($foreground, base);
|
||||
color: map-get($foreground, text);
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-right: 1rem;
|
||||
|
||||
Reference in New Issue
Block a user