Rate limits update styles
This commit is contained in:
parent
b3fdc881f4
commit
88599262da
@ -20,7 +20,7 @@
|
|||||||
<h2>{{ title | translate }}</h2>
|
<h2>{{ title | translate }}</h2>
|
||||||
<span fxFlex></span>
|
<span fxFlex></span>
|
||||||
<button mat-icon-button
|
<button mat-icon-button
|
||||||
(click)="cancel()"
|
[matDialogClose]="undefined"
|
||||||
type="button">
|
type="button">
|
||||||
<mat-icon class="material-icons">close</mat-icon>
|
<mat-icon class="material-icons">close</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
@ -37,7 +37,8 @@
|
|||||||
<div mat-dialog-actions fxLayoutAlign="end center">
|
<div mat-dialog-actions fxLayoutAlign="end center">
|
||||||
<button mat-button color="primary"
|
<button mat-button color="primary"
|
||||||
type="button"
|
type="button"
|
||||||
(click)="cancel()" cdkFocusInitial>
|
[matDialogClose]="undefined"
|
||||||
|
cdkFocusInitial>
|
||||||
{{ 'action.cancel' | translate }}
|
{{ 'action.cancel' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="!data.readonly" mat-raised-button color="primary" (click)="save()"
|
<button *ngIf="!data.readonly" mat-raised-button color="primary" (click)="save()"
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
/// limitations under the License.
|
/// limitations under the License.
|
||||||
///
|
///
|
||||||
|
|
||||||
import { Component, Inject, OnInit, SkipSelf } from '@angular/core';
|
import { Component, Inject, SkipSelf } from '@angular/core';
|
||||||
import { ErrorStateMatcher } from '@angular/material/core';
|
import { ErrorStateMatcher } from '@angular/material/core';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
@ -33,7 +33,7 @@ export interface RateLimitsDetailsDialogData {
|
|||||||
@Component({
|
@Component({
|
||||||
templateUrl: './rate-limits-details-dialog.component.html'
|
templateUrl: './rate-limits-details-dialog.component.html'
|
||||||
})
|
})
|
||||||
export class RateLimitsDetailsDialogComponent extends DialogComponent<RateLimitsDetailsDialogComponent> implements OnInit {
|
export class RateLimitsDetailsDialogComponent extends DialogComponent<RateLimitsDetailsDialogComponent> {
|
||||||
|
|
||||||
editDetailsFormGroup: FormGroup;
|
editDetailsFormGroup: FormGroup;
|
||||||
|
|
||||||
@ -49,7 +49,6 @@ export class RateLimitsDetailsDialogComponent extends DialogComponent<RateLimits
|
|||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
public translate: TranslateService) {
|
public translate: TranslateService) {
|
||||||
super(store, router, dialogRef);
|
super(store, router, dialogRef);
|
||||||
|
|
||||||
this.editDetailsFormGroup = this.fb.group({
|
this.editDetailsFormGroup = this.fb.group({
|
||||||
rateLimits: [this.rateLimits, []]
|
rateLimits: [this.rateLimits, []]
|
||||||
});
|
});
|
||||||
@ -58,15 +57,7 @@ export class RateLimitsDetailsDialogComponent extends DialogComponent<RateLimits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
|
||||||
}
|
|
||||||
|
|
||||||
cancel(): void {
|
|
||||||
this.dialogRef.close(undefined);
|
|
||||||
}
|
|
||||||
|
|
||||||
save(): void {
|
save(): void {
|
||||||
this.dialogRef.close(this.editDetailsFormGroup.get('rateLimits').value);
|
this.dialogRef.close(this.editDetailsFormGroup.get('rateLimits').value);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,6 +14,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
:host {
|
:host {
|
||||||
|
@media screen and (min-width: 800px) {
|
||||||
|
min-width: 600px;
|
||||||
|
}
|
||||||
|
|
||||||
.tb-rate-limits-preview {
|
.tb-rate-limits-preview {
|
||||||
margin-top: 1.5em;
|
margin-top: 1.5em;
|
||||||
span {
|
span {
|
||||||
|
|||||||
@ -35,6 +35,7 @@ import {
|
|||||||
RateLimitsType,
|
RateLimitsType,
|
||||||
stringToRateLimitsArray
|
stringToRateLimitsArray
|
||||||
} from './rate-limits.models';
|
} from './rate-limits.models';
|
||||||
|
import { isDefined } from '@core/utils';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'tb-rate-limits',
|
selector: 'tb-rate-limits',
|
||||||
@ -120,7 +121,7 @@ export class RateLimitsComponent implements ControlValueAccessor, OnInit, Valida
|
|||||||
readonly: this.disabled
|
readonly: this.disabled
|
||||||
}
|
}
|
||||||
}).afterClosed().subscribe((result) => {
|
}).afterClosed().subscribe((result) => {
|
||||||
if (result || result === null) {
|
if (isDefined(result)) {
|
||||||
this.modelValue = result;
|
this.modelValue = result;
|
||||||
this.updateModel();
|
this.updateModel();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user