Update angular to 4.0.0
This commit is contained in:
committed by
József Farkas
parent
d45551c4fd
commit
f6744b737a
17
package.json
17
package.json
@@ -39,13 +39,14 @@
|
|||||||
"webpack-svgstore-plugin": "4.0.0"
|
"webpack-svgstore-plugin": "4.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.4.10",
|
"@angular/animations": "4.0.0",
|
||||||
"@angular/compiler": "2.4.10",
|
"@angular/common": "4.0.0",
|
||||||
"@angular/core": "2.4.10",
|
"@angular/compiler": "4.0.0",
|
||||||
"@angular/forms": "2.4.10",
|
"@angular/core": "4.0.0",
|
||||||
"@angular/platform-browser": "2.4.10",
|
"@angular/forms": "4.0.0",
|
||||||
"@angular/platform-browser-dynamic": "2.4.10",
|
"@angular/platform-browser": "4.0.0",
|
||||||
"@angular/router": "3.4.10",
|
"@angular/platform-browser-dynamic": "4.0.0",
|
||||||
|
"@angular/router": "4.0.0",
|
||||||
"@ngrx/core": "1.2.0",
|
"@ngrx/core": "1.2.0",
|
||||||
"@ngrx/effects": "2.0.1",
|
"@ngrx/effects": "2.0.1",
|
||||||
"@ngrx/store": "2.2.1",
|
"@ngrx/store": "2.2.1",
|
||||||
@@ -66,7 +67,7 @@
|
|||||||
"typescript": "2.2.1",
|
"typescript": "2.2.1",
|
||||||
"usb": "git+https://github.com/aktary/node-usb.git",
|
"usb": "git+https://github.com/aktary/node-usb.git",
|
||||||
"xml-loader": "1.2.1",
|
"xml-loader": "1.2.1",
|
||||||
"zone.js": "0.8.4"
|
"zone.js": "0.8.5"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "run-p build:usb \"symlink -- -i\" ",
|
"postinstall": "run-p build:usb \"symlink -- -i\" ",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template [ngIf]="keymap$ | async">
|
<ng-template [ngIf]="keymap$ | async">
|
||||||
<keymap-header [keymap]="keymap$ | async" [deletable]="deletable$ | async" (downloadClick)="downloadKeymap()"></keymap-header>
|
<keymap-header [keymap]="keymap$ | async" [deletable]="deletable$ | async" (downloadClick)="downloadKeymap()"></keymap-header>
|
||||||
<svg-keyboard-wrap [keymap]="keymap$ | async"></svg-keyboard-wrap>
|
<svg-keyboard-wrap [keymap]="keymap$ | async"></svg-keyboard-wrap>
|
||||||
</template>
|
</ng-template>
|
||||||
|
|
||||||
<div *ngIf="!(keymap$ | async)" class="not-found">
|
<div *ngIf="!(keymap$ | async)" class="not-found">
|
||||||
Sorry, there is no keymap with this abbreviation.
|
Sorry, there is no keymap with this abbreviation.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<template [ngIf]="macro">
|
<ng-template [ngIf]="macro">
|
||||||
<macro-header
|
<macro-header
|
||||||
[macro]="macro"
|
[macro]="macro"
|
||||||
[isNew]="isNew"
|
[isNew]="isNew"
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
(delete)="deleteAction($event.macroId, $event.index, $event.action)"
|
(delete)="deleteAction($event.macroId, $event.index, $event.action)"
|
||||||
(reorder)="reorderAction($event.macroId, $event.oldIndex, $event.newIndex)"
|
(reorder)="reorderAction($event.macroId, $event.oldIndex, $event.newIndex)"
|
||||||
></macro-list>
|
></macro-list>
|
||||||
</template>
|
</ng-template>
|
||||||
|
|
||||||
<div *ngIf="!macro" class="not-found">
|
<div *ngIf="!macro" class="not-found">
|
||||||
There is no macro with id {{ route.params.select('id') | async }}.
|
There is no macro with id {{ route.params.select('id') | async }}.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template [ngIf]="keymapOptions.length === 0">
|
<ng-template [ngIf]="keymapOptions.length === 0">
|
||||||
<span> No keymaps are available to choose from. Create a keymap first! </span>
|
<span> No keymaps are available to choose from. Create a keymap first! </span>
|
||||||
</template>
|
</ng-template>
|
||||||
<template [ngIf]="keymapOptions.length > 0">
|
<ng-template [ngIf]="keymapOptions.length > 0">
|
||||||
<div>
|
<div>
|
||||||
<b>Switch to keymap:</b>
|
<b>Switch to keymap:</b>
|
||||||
<select2
|
<select2
|
||||||
@@ -19,4 +19,4 @@
|
|||||||
[moduleConfig]="selectedKeymap.layers[0].modules">
|
[moduleConfig]="selectedKeymap.layers[0].modules">
|
||||||
</svg-keyboard>
|
</svg-keyboard>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</ng-template>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<template [ngIf]="!isNotBase">
|
<ng-template [ngIf]="!isNotBase">
|
||||||
<select (change)="toggleChanged($event.target.value)">
|
<select (change)="toggleChanged($event.target.value)">
|
||||||
<option *ngFor="let item of toggleData" [value]="item.id" [selected]="toggle === item.id">
|
<option *ngFor="let item of toggleData" [value]="item.id" [selected]="toggle === item.id">
|
||||||
{{ item.text }}
|
{{ item.text }}
|
||||||
@@ -11,10 +11,10 @@
|
|||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<span [ngSwitch]="toggle">
|
<span [ngSwitch]="toggle">
|
||||||
<template [ngSwitchCase]="true">layer by pressing this key.</template>
|
<ng-template [ngSwitchCase]="true">layer by pressing this key.</ng-template>
|
||||||
<template ngSwitchDefault>layer by holding this key.</template>
|
<ng-template ngSwitchDefault>layer by holding this key.</ng-template>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</ng-template>
|
||||||
<template [ngIf]="isNotBase">
|
<ng-template [ngIf]="isNotBase">
|
||||||
<span> Layer switching is only possible from the base layer. </span>
|
<span> Layer switching is only possible from the base layer. </span>
|
||||||
</template>
|
</ng-template>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<template [ngIf]="macroOptions.length === 0">
|
<ng-template [ngIf]="macroOptions.length === 0">
|
||||||
<span> No macros are available to choose from. Create a macro first! </span>
|
<span> No macros are available to choose from. Create a macro first! </span>
|
||||||
</template>
|
</ng-template>
|
||||||
<template [ngIf]="macroOptions.length > 0">
|
<ng-template [ngIf]="macroOptions.length > 0">
|
||||||
<div class="macro-selector">
|
<div class="macro-selector">
|
||||||
<b> Play macro: </b>
|
<b> Play macro: </b>
|
||||||
<select2 [data]="macroOptions" [value]="macroOptions[selectedMacroIndex].id" (valueChanged)="onChange($event)" [width]="'100%'"></select2>
|
<select2 [data]="macroOptions" [value]="macroOptions[selectedMacroIndex].id" (valueChanged)="onChange($event)" [width]="'100%'"></select2>
|
||||||
@@ -13,4 +13,4 @@
|
|||||||
</macro-item>
|
</macro-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</ng-template>
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
(click)="start()"
|
(click)="start()"
|
||||||
>
|
>
|
||||||
<i class="fa fa-circle"></i>
|
<i class="fa fa-circle"></i>
|
||||||
<template [ngIf]="!record">
|
<ng-template [ngIf]="!record">
|
||||||
Capture keystroke
|
Capture keystroke
|
||||||
</template>
|
</ng-template>
|
||||||
<template [ngIf]="record">
|
<ng-template [ngIf]="record">
|
||||||
Capturing ...
|
Capturing ...
|
||||||
</template>
|
</ng-template>
|
||||||
</button>
|
</button>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
[attr.height]="height" [attr.width]="width"
|
[attr.height]="height" [attr.width]="width"
|
||||||
[attr.fill]="fill"
|
[attr.fill]="fill"
|
||||||
/>
|
/>
|
||||||
<template [ngIf]="recording">
|
<ng-template [ngIf]="recording">
|
||||||
<svg:circle
|
<svg:circle
|
||||||
[@recording]="recordAnimation"
|
[@recording]="recordAnimation"
|
||||||
(@recording.done)="onRecordingAnimationDone()"
|
(@recording.done)="onRecordingAnimationDone()"
|
||||||
@@ -13,8 +13,8 @@
|
|||||||
[attr.r]="10"
|
[attr.r]="10"
|
||||||
[attr.fill]="'#c00'"
|
[attr.fill]="'#c00'"
|
||||||
></svg:circle>
|
></svg:circle>
|
||||||
</template>
|
</ng-template>
|
||||||
<template [ngIf]="!recording">
|
<ng-template [ngIf]="!recording">
|
||||||
<svg:g [ngSwitch]="labelType"
|
<svg:g [ngSwitch]="labelType"
|
||||||
[attr.font-size]="19"
|
[attr.font-size]="19"
|
||||||
[attr.font-family]="'Helvetica'"
|
[attr.font-family]="'Helvetica'"
|
||||||
@@ -62,4 +62,4 @@
|
|||||||
<svg:g svg-mouse-key [mouseAction]="labelSource"></svg:g>
|
<svg:g svg-mouse-key [mouseAction]="labelSource"></svg:g>
|
||||||
</svg>
|
</svg>
|
||||||
</svg:g>
|
</svg:g>
|
||||||
</template>
|
</ng-template>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -1,4 +1,4 @@
|
|||||||
<template ngIf="layers">
|
<ng-template [ngIf]="layers">
|
||||||
<layers [class.disabled]="popoverShown" (select)="selectLayer($event.index)" [current]="currentLayer"></layers>
|
<layers [class.disabled]="popoverShown" (select)="selectLayer($event.index)" [current]="currentLayer"></layers>
|
||||||
<keyboard-slider [layers]="layers"
|
<keyboard-slider [layers]="layers"
|
||||||
[currentLayer]="currentLayer"
|
[currentLayer]="currentLayer"
|
||||||
@@ -22,4 +22,4 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</ng-template>
|
||||||
@@ -119,7 +119,8 @@ export class SvgKeyboardWrapComponent implements OnInit, OnChanges {
|
|||||||
if (keymapChanges) {
|
if (keymapChanges) {
|
||||||
this.popoverShown = false;
|
this.popoverShown = false;
|
||||||
this.layers = this.keymap.layers;
|
this.layers = this.keymap.layers;
|
||||||
if (keymapChanges.previousValue.abbreviation !== keymapChanges.currentValue.abbreviation) {
|
if (keymapChanges.isFirstChange() ||
|
||||||
|
keymapChanges.previousValue.abbreviation !== keymapChanges.currentValue.abbreviation) {
|
||||||
this.currentLayer = 0;
|
this.currentLayer = 0;
|
||||||
this.keybindAnimationEnabled = keymapChanges.isFirstChange();
|
this.keybindAnimationEnabled = keymapChanges.isFirstChange();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { NgModule, ReflectiveInjector } from '@angular/core';
|
import { NgModule, ReflectiveInjector } from '@angular/core';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
|
|
||||||
import { EffectsModule } from '@ngrx/effects';
|
import { EffectsModule } from '@ngrx/effects';
|
||||||
import { StoreModule } from '@ngrx/store';
|
import { StoreModule } from '@ngrx/store';
|
||||||
@@ -135,6 +136,7 @@ const storeConfig = {
|
|||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
|
BrowserAnimationsModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
DragulaModule,
|
DragulaModule,
|
||||||
routing,
|
routing,
|
||||||
|
|||||||
Reference in New Issue
Block a user