Fix all linter errors.
This commit is contained in:
@@ -119,7 +119,7 @@ ul {
|
|||||||
|
|
||||||
&__name,
|
&__name,
|
||||||
&__abbrev {
|
&__abbrev {
|
||||||
&[contenteditable=true]{
|
&[contenteditable=true] {
|
||||||
border: none;
|
border: none;
|
||||||
border-bottom: 2px dotted #999;
|
border-bottom: 2px dotted #999;
|
||||||
padding: 0 0.5rem;
|
padding: 0 0.5rem;
|
||||||
|
|||||||
@@ -193,9 +193,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.select2-results {
|
.select2-results {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||||
line-height: 26px !important;
|
line-height: 26px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import { SvgKeystrokeKeyComponent } from './components/svg/keys/svg-keystroke-ke
|
|||||||
import { SvgOneLineTextKeyComponent } from './components/svg/keys/svg-one-line-text-key.component';
|
import { SvgOneLineTextKeyComponent } from './components/svg/keys/svg-one-line-text-key.component';
|
||||||
import { SvgTwoLineTextKeyComponent } from './components/svg/keys/svg-two-line-text-key.component';
|
import { SvgTwoLineTextKeyComponent } from './components/svg/keys/svg-two-line-text-key.component';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
MainAppComponent,
|
MainAppComponent,
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ export class KeymapComponent implements OnInit, AfterViewInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.subParams = this.route.params.subscribe(params => {
|
this.subParams = this.route.params.subscribe((params: { id: string }) => {
|
||||||
let id: number = +params['id'];
|
let id: number = +params.id;
|
||||||
|
|
||||||
if (!isNaN(id)) {
|
if (!isNaN(id)) {
|
||||||
this.keymapId = id;
|
this.keymapId = id;
|
||||||
@@ -125,7 +125,7 @@ export class KeymapComponent implements OnInit, AfterViewInit {
|
|||||||
let animationNameTokens: string[] = event.animationName.split('-');
|
let animationNameTokens: string[] = event.animationName.split('-');
|
||||||
let animationFrom: string = animationNameTokens[1];
|
let animationFrom: string = animationNameTokens[1];
|
||||||
let animationTo: string = animationNameTokens[2];
|
let animationTo: string = animationNameTokens[2];
|
||||||
if ((<HTMLElement> event.target).style.animationDirection === 'reverse') {
|
if ((<HTMLElement>event.target).style.animationDirection === 'reverse') {
|
||||||
animationFrom = animationNameTokens[2];
|
animationFrom = animationNameTokens[2];
|
||||||
animationTo = animationNameTokens[1];
|
animationTo = animationNameTokens[1];
|
||||||
this.renderer.setElementStyle(event.target, 'animation-direction', undefined);
|
this.renderer.setElementStyle(event.target, 'animation-direction', undefined);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {ActivatedRoute} from '@angular/router';
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'legacy',
|
selector: 'legacy',
|
||||||
template:
|
template:
|
||||||
`
|
`
|
||||||
<iframe [src]="safeLink" frameborder="0" scrolling="no"></iframe>
|
<iframe [src]="safeLink" frameborder="0" scrolling="no"></iframe>
|
||||||
`,
|
`,
|
||||||
styles: [require('./legacy-loader.component.scss')]
|
styles: [require('./legacy-loader.component.scss')]
|
||||||
@@ -13,13 +13,12 @@ import {ActivatedRoute} from '@angular/router';
|
|||||||
export class LegacyLoaderComponent {
|
export class LegacyLoaderComponent {
|
||||||
private safeLink: SafeResourceUrl;
|
private safeLink: SafeResourceUrl;
|
||||||
|
|
||||||
constructor(private sanitationService: DomSanitizationService, private route: ActivatedRoute) {
|
constructor(private sanitationService: DomSanitizationService, private route: ActivatedRoute) { }
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.params.subscribe(params => {
|
this.route.params.subscribe((params: { id: string }) => {
|
||||||
if (params['id']) {
|
if (params.id) {
|
||||||
this.safeLink = this.sanitationService.bypassSecurityTrustResourceUrl(params['id'] + 'Legacy.html');
|
this.safeLink = this.sanitationService.bypassSecurityTrustResourceUrl(params.id + 'Legacy.html');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,10 @@ export class PopoverComponent implements OnInit {
|
|||||||
|
|
||||||
@ViewChild('tab') selectedTab: Tab;
|
@ViewChild('tab') selectedTab: Tab;
|
||||||
|
|
||||||
|
/* tslint:disable:variable-name: It is an enum type. So it can start with uppercase. */
|
||||||
|
/* tslint:disable:no-unused-variable: It is used in the template. */
|
||||||
private TabName = TabName;
|
private TabName = TabName;
|
||||||
|
/* tslint:enable:no-unused-variable tslint:enable:variable-name */
|
||||||
private activeTab: TabName;
|
private activeTab: TabName;
|
||||||
|
|
||||||
constructor() { }
|
constructor() { }
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ export class KeypressTabComponent implements OnInit, Tab {
|
|||||||
// Restore scancode
|
// Restore scancode
|
||||||
this.scanCode = keystrokeAction.scancode || 0;
|
this.scanCode = keystrokeAction.scancode || 0;
|
||||||
|
|
||||||
|
|
||||||
let leftModifiersLength: number = this.leftModifiers.length;
|
let leftModifiersLength: number = this.leftModifiers.length;
|
||||||
|
|
||||||
// Restore modifiers
|
// Restore modifiers
|
||||||
@@ -131,12 +130,16 @@ export class KeypressTabComponent implements OnInit, Tab {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: change to the correct type when the wrapper has added it.
|
// TODO: change to the correct type when the wrapper has added it.
|
||||||
|
/* tslint:disable:no-unused-variable: It is used in the template. */
|
||||||
private onLongpressChange(event: any) {
|
private onLongpressChange(event: any) {
|
||||||
|
/* tslint:enable:no-unused-variable: */
|
||||||
this.selectedLongPressIndex = +event.value;
|
this.selectedLongPressIndex = +event.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: change to the correct type when the wrapper has added it.
|
// TODO: change to the correct type when the wrapper has added it.
|
||||||
|
/* tslint:disable:no-unused-variable: It is used in the template. */
|
||||||
private onScancodeChange(event: any) {
|
private onScancodeChange(event: any) {
|
||||||
|
/* tslint:enable:no-unused-variable */
|
||||||
this.scanCode = +event.value;
|
this.scanCode = +event.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ export class LayerTabComponent implements OnInit, Tab {
|
|||||||
private toggle: boolean;
|
private toggle: boolean;
|
||||||
private layer: LayerName;
|
private layer: LayerName;
|
||||||
|
|
||||||
|
/* tslint:disable:no-unused-variable: They're used in the template */
|
||||||
private toggleData: Array<Select2OptionData> = [
|
private toggleData: Array<Select2OptionData> = [
|
||||||
{
|
{
|
||||||
id: 'false',
|
id: 'false',
|
||||||
@@ -48,6 +49,7 @@ export class LayerTabComponent implements OnInit, Tab {
|
|||||||
text: 'Mouse'
|
text: 'Mouse'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
/* tslint:enable:no-unused-variable */
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.toggle = false;
|
this.toggle = false;
|
||||||
@@ -80,12 +82,16 @@ export class LayerTabComponent implements OnInit, Tab {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: change to the correct type when the wrapper has added it.
|
// TODO: change to the correct type when the wrapper has added it.
|
||||||
|
/* tslint:disable:no-unused-variable: This function is used in the template */
|
||||||
private toggleChanged(event: any) {
|
private toggleChanged(event: any) {
|
||||||
|
/* tslint:enable:no-unused-variable */
|
||||||
this.toggle = event.value;
|
this.toggle = event.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: change to the correct type when the wrapper has added it.
|
// TODO: change to the correct type when the wrapper has added it.
|
||||||
|
/* tslint:disable:no-unused-variable: This function is used in the template */
|
||||||
private layerChanged(event: any) {
|
private layerChanged(event: any) {
|
||||||
|
/* tslint:enable:no-unused-variable */
|
||||||
this.layer = +event.value;
|
this.layer = +event.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,16 +2,10 @@ import { Component, OnInit, OnChanges, Input } from '@angular/core';
|
|||||||
|
|
||||||
import {MacroAction} from '../../../../../config-serializer/config-items/MacroAction';
|
import {MacroAction} from '../../../../../config-serializer/config-items/MacroAction';
|
||||||
import {DelayMacroAction} from '../../../../../config-serializer/config-items/DelayMacroAction';
|
import {DelayMacroAction} from '../../../../../config-serializer/config-items/DelayMacroAction';
|
||||||
import {HoldKeyMacroAction} from '../../../../../config-serializer/config-items/HoldKeyMacroAction';
|
|
||||||
import {HoldModifiersMacroAction} from '../../../../../config-serializer/config-items/HoldModifiersMacroAction';
|
import {HoldModifiersMacroAction} from '../../../../../config-serializer/config-items/HoldModifiersMacroAction';
|
||||||
import {HoldMouseButtonsMacroAction} from '../../../../../config-serializer/config-items/HoldMouseButtonsMacroAction';
|
|
||||||
import {MoveMouseMacroAction} from '../../../../../config-serializer/config-items/MoveMouseMacroAction';
|
import {MoveMouseMacroAction} from '../../../../../config-serializer/config-items/MoveMouseMacroAction';
|
||||||
import {PressKeyMacroAction} from '../../../../../config-serializer/config-items/PressKeyMacroAction';
|
|
||||||
import {PressModifiersMacroAction} from '../../../../../config-serializer/config-items/PressModifiersMacroAction';
|
import {PressModifiersMacroAction} from '../../../../../config-serializer/config-items/PressModifiersMacroAction';
|
||||||
import {PressMouseButtonsMacroAction} from '../../../../../config-serializer/config-items/PressMouseButtonsMacroAction';
|
|
||||||
import {ReleaseKeyMacroAction} from '../../../../../config-serializer/config-items/ReleaseKeyMacroAction';
|
|
||||||
import {ReleaseModifiersMacroAction} from '../../../../../config-serializer/config-items/ReleaseModifiersMacroAction';
|
import {ReleaseModifiersMacroAction} from '../../../../../config-serializer/config-items/ReleaseModifiersMacroAction';
|
||||||
import {ReleaseMouseButtonsMacroAction} from '../../../../../config-serializer/config-items/ReleaseMouseButtonsMacroAction';
|
|
||||||
import {ScrollMouseMacroAction} from '../../../../../config-serializer/config-items/ScrollMouseMacroAction';
|
import {ScrollMouseMacroAction} from '../../../../../config-serializer/config-items/ScrollMouseMacroAction';
|
||||||
import {TextMacroAction} from '../../../../../config-serializer/config-items/TextMacroAction';
|
import {TextMacroAction} from '../../../../../config-serializer/config-items/TextMacroAction';
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,10 @@ export class MouseTabComponent implements OnInit, Tab {
|
|||||||
|
|
||||||
private mouseActionParam: MouseActionParam;
|
private mouseActionParam: MouseActionParam;
|
||||||
private selectedPageIndex: number;
|
private selectedPageIndex: number;
|
||||||
|
/* tslint:disable:variable-name: It is an enum type. So it can start with uppercase. */
|
||||||
|
/* tslint:disable:no-unused-variable: It is used in the template. */
|
||||||
private MouseActionParam = MouseActionParam;
|
private MouseActionParam = MouseActionParam;
|
||||||
|
/* tslint:enable:no-unused-variable tslint:enable:variable-name */
|
||||||
|
|
||||||
private pages: string[];
|
private pages: string[];
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import {Component, OnInit } from '@angular/core';
|
import {Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
import {Tab} from '../tab';
|
import {Tab} from '../tab';
|
||||||
import {KeyAction} from '../../../../../config-serializer/config-items/KeyAction';
|
|
||||||
import {NoneAction} from '../../../../../config-serializer/config-items/NoneAction';
|
import {NoneAction} from '../../../../../config-serializer/config-items/NoneAction';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -19,7 +18,7 @@ export class NoneTabComponent implements OnInit, Tab {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
fromKeyAction(keyAction: KeyAction): boolean {
|
fromKeyAction(): boolean {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ export class CaptureKeystrokeButtonComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() { }
|
ngOnInit() { }
|
||||||
|
|
||||||
private start(): void {
|
start(): void {
|
||||||
this.record = true;
|
this.record = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private stop(): void {
|
stop(): void {
|
||||||
this.record = false;
|
this.record = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,15 +16,16 @@ export class SideMenuComponent implements OnInit {
|
|||||||
private keymaps: Keymap[];
|
private keymaps: Keymap[];
|
||||||
private macros: Macro[];
|
private macros: Macro[];
|
||||||
|
|
||||||
constructor(private uhkConfigurationService: UhkConfigurationService) {
|
constructor(private uhkConfigurationService: UhkConfigurationService) { }
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.keymaps = this.uhkConfigurationService.getUhkConfiguration().keymaps.elements;
|
this.keymaps = this.uhkConfigurationService.getUhkConfiguration().keymaps.elements;
|
||||||
this.macros = this.uhkConfigurationService.getUhkConfiguration().macros.elements;
|
this.macros = this.uhkConfigurationService.getUhkConfiguration().macros.elements;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* tslint:disable:no-unused-variable: This function is used in the template */
|
||||||
private toggleHide(event: Event, view: Element) {
|
private toggleHide(event: Event, view: Element) {
|
||||||
|
/* tslint:enable:no-unused-variable */
|
||||||
let header: DOMTokenList = (<Element> event.target).classList;
|
let header: DOMTokenList = (<Element> event.target).classList;
|
||||||
|
|
||||||
view.classList.toggle('slide-up');
|
view.classList.toggle('slide-up');
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ export class SvgTextIconKeyComponent implements OnInit {
|
|||||||
@Input() text: string;
|
@Input() text: string;
|
||||||
@Input() icon: string;
|
@Input() icon: string;
|
||||||
|
|
||||||
|
|
||||||
private useWidth: number;
|
private useWidth: number;
|
||||||
private useHeight: number;
|
private useHeight: number;
|
||||||
private useX: number;
|
private useX: number;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<tspan
|
<tspan
|
||||||
*ngFor="let text of texts; let index = index"
|
*ngFor="let text of texts; let index = index"
|
||||||
[attr.x]="spanX"
|
[attr.x]="spanX"
|
||||||
[attr.y]="spanY(index)"
|
[attr.y]="spanYs[index]"
|
||||||
dy="0"
|
dy="0"
|
||||||
>{{ text }}</tspan>
|
>{{ text }}</tspan>
|
||||||
</svg:text>
|
</svg:text>
|
||||||
|
Before Width: | Height: | Size: 305 B After Width: | Height: | Size: 306 B |
@@ -12,15 +12,17 @@ export class SvgTwoLineTextKeyComponent implements OnInit {
|
|||||||
|
|
||||||
private textY: number;
|
private textY: number;
|
||||||
private spanX: number;
|
private spanX: number;
|
||||||
|
private spanYs: number[];
|
||||||
|
|
||||||
constructor() { }
|
constructor() {
|
||||||
|
this.spanYs = [];
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.textY = this.height / 2;
|
this.textY = this.height / 2;
|
||||||
this.spanX = this.width / 2;
|
this.spanX = this.width / 2;
|
||||||
}
|
for (let i = 0; i < this.texts.length; ++i) {
|
||||||
|
this.spanYs.push((0.75 - i * 0.5) * this.height);
|
||||||
private spanY(index: number) {
|
}
|
||||||
return (0.75 - index * 0.5) * this.height;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,8 +94,7 @@
|
|||||||
"check-operator",
|
"check-operator",
|
||||||
"check-module",
|
"check-module",
|
||||||
"check-separator",
|
"check-separator",
|
||||||
"check-type",
|
"check-type"
|
||||||
"check-typecast"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user