fix: use OnPush change detection on the keymap edit and add pages (#760)

* fix: use OnPush change detection on the keymap edit and add pages

* fix: font-size
This commit is contained in:
Róbert Kiss
2018-08-26 22:08:29 +02:00
committed by László Monda
parent a7d3b62512
commit df817e86d6
9 changed files with 21 additions and 11 deletions

View File

@@ -227,9 +227,9 @@
}
},
"@ert78gb/ngx-select-ex": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/@ert78gb/ngx-select-ex/-/ngx-select-ex-3.7.0.tgz",
"integrity": "sha512-m3DyGB1VZrxsItgc/NjBt5ZfW1DuQrxLz82ekw/ur79DZHG89EYohKWbx68lonfu8wM+AT4IHUDVqF1gFhyK0g==",
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/@ert78gb/ngx-select-ex/-/ngx-select-ex-3.7.2.tgz",
"integrity": "sha512-tFliRieRxNLHLpUGqGez2++C5PmmUYd1AvriHK2127X0QhOp3hWZ1/4j9etF9ZgE4Ti465sUtu8KcK5B0jjiTQ==",
"dev": true,
"requires": {
"tslib": "1.9.0"

View File

@@ -62,7 +62,7 @@
"ng2-dragula": "1.5.0",
"ng2-nouislider": "^1.7.7",
"ngx-clipboard": "10.0.0",
"@ert78gb/ngx-select-ex": "3.7.0",
"@ert78gb/ngx-select-ex": "3.7.2",
"ngrx-store-freeze": "0.1.9",
"nouislider": "^11.1.0",
"postcss-url": "^7.1.2",

View File

@@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { Store } from '@ngrx/store';
import { Keymap } from 'uhk-common';
@@ -14,6 +14,7 @@ import { KeymapActions } from '../../../store/actions';
selector: 'keymap-add',
templateUrl: './keymap-add.component.html',
styleUrls: ['./keymap-add.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
host: {
'class': 'container-fluid'
}

View File

@@ -1,4 +1,4 @@
import { Component, HostListener } from '@angular/core';
import { ChangeDetectionStrategy, Component, HostListener } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Store } from '@ngrx/store';
import { Keymap } from 'uhk-common';
@@ -24,6 +24,7 @@ import { ChangeKeymapDescription } from '../../../models/ChangeKeymapDescription
selector: 'keymap-edit',
templateUrl: './keymap-edit.component.html',
styleUrls: ['./keymap-edit.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
host: {
'class': 'container-fluid'
}

View File

@@ -1,4 +1,5 @@
import {
ChangeDetectionStrategy,
Component,
ElementRef,
EventEmitter,
@@ -47,6 +48,7 @@ enum TabName {
selector: 'popover',
templateUrl: './popover.component.html',
styleUrls: ['./popover.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
animations: [
trigger('popover', [
state('closed', style({

View File

@@ -1,10 +1,11 @@
import { Component, EventEmitter, HostListener, Output, Input } from '@angular/core';
import { ChangeDetectionStrategy, Component, EventEmitter, HostListener, Input, Output } from '@angular/core';
import { CaptureService } from '../../../../services/capture.service';
@Component({
selector: 'capture-keystroke-button',
templateUrl: './capture-keystroke-button.component.html',
styleUrls: ['./capture-keystroke-button.component.scss']
styleUrls: ['./capture-keystroke-button.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class CaptureKeystrokeButtonComponent {
@Input() isLink = false;

View File

@@ -1,9 +1,10 @@
import { Component, Input, OnInit } from '@angular/core';
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
@Component({
selector: 'icon',
templateUrl: './icon.component.html',
styleUrls: ['./icon.component.scss']
styleUrls: ['./icon.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class IconComponent implements OnInit {

View File

@@ -5,7 +5,7 @@ import { SvgKeyboardKey } from '../keys';
import {
SvgKeyCaptureEvent,
SvgKeyClickEvent,
SvgModuleCaptureEvent,
SvgModuleCaptureEvent,
SvgModuleKeyClickEvent
} from '../../../models/svg-key-events';

View File

@@ -4,6 +4,10 @@ ngx-select,
font-size: 14px;
}
input.input-sm {
font-size: 14px;
}
.dropdown-header {
font-weight: bold;
font-size: 1em;