refactore: create feature modules (#387)

* add @angular/cli to the project

* increase nodejs version -> 8.2.1

* add lerna

* merge web and shared module

* move electron module into packages as uhk-agent

Electron agent functionality is not working

* delete symlinker

* convert private properties to public of component if used in html

* revert uhk-message.component

* fix component path

* fix the correct name of the uhk-message.component.scss

* building web and electron module

* delete uhk-renderer package

* handle device connect disconnect state

* add privilege detection

* fix set privilege functionality

* turn back download keymap functionality

* add bootstrap, select2 js and fix null pointer exception

* turn back upload data to keyboard

* fix send keymap

* fix test-serializer

* add missing package.json

* merging

* fix appveyor build

* fix linting

* turn back electron storage service

* commit the missing electron-datastorage-repository

* update node to 8.3.0 in .nvmrc and log node version in appveyor build

* set exact version number in appveyor build

* vertical align privilege and missing device components

* set back node version to 8 in appveyor

* move node-usb dependency from usb dir to root

maybe it is fix the appveyor build

* revert usb to root

* fix electron builder script

* fix electron builder script

* turn off electron devtools

* remove CTRL+U functionality

* fix CTRL+o

* fix lint error

* turnoff store freeze

* start process when got `Error: EPERM: operation not permitted` error

* move files from root usb dir -> packages/usb
This commit is contained in:
Róbert Kiss
2017-08-19 20:02:17 +02:00
committed by László Monda
parent 97770f67c0
commit 0f558e4132
524 changed files with 25606 additions and 5036 deletions

View File

@@ -0,0 +1,2 @@
export * from './settings.component';
export * from './settings.routes';

View File

@@ -0,0 +1,13 @@
<div class="row">
<h1 class="col-xs-12 pane-title">
<i class="fa fa-gear"></i>
<span class="macro__name pane-title__name">Settings</span>
</h1>
</div>
<auto-update-settings [version]="version"
[settings]="autoUpdateSettings$ | async"
[checkingForUpdate]="checkingForUpdate$ | async"
(toggleCheckForUpdateOnStartUp)="toogleCheckForUpdateOnStartUp($event)"
(toggleUsePreReleaseUpdate)="toogleUsePreReleaseUpdate($event)"
(checkForUpdate)="checkForUpdate()">
</auto-update-settings>

View File

@@ -0,0 +1,5 @@
:host {
width: 100%;
height: 100%;
display: block;
}

View File

@@ -0,0 +1,43 @@
import { Component } from '@angular/core';
import { Store } from '@ngrx/store';
import { Observable } from 'rxjs/Observable';
import { AppState, getAutoUpdateSettings, getCheckingForUpdate } from '../../store';
import {
CheckForUpdateNowAction,
ToggleCheckForUpdateOnStartupAction,
TogglePreReleaseFlagAction
} from '../../store/actions/auto-update-settings';
import { AutoUpdateSettings } from '../../models/auto-update-settings';
@Component({
selector: 'settings',
templateUrl: './settings.component.html',
styleUrls: ['./settings.component.scss'],
host: {
'class': 'container-fluid'
}
})
export class SettingsComponent {
// TODO: From where do we get the version number? The electron gives back in main process, but the web...
version = '1.0.0';
autoUpdateSettings$: Observable<AutoUpdateSettings>;
checkingForUpdate$: Observable<boolean>;
constructor(private store: Store<AppState>) {
this.autoUpdateSettings$ = store.select(getAutoUpdateSettings);
this.checkingForUpdate$ = store.select(getCheckingForUpdate);
}
toogleCheckForUpdateOnStartUp(value: boolean) {
this.store.dispatch(new ToggleCheckForUpdateOnStartupAction(value));
}
toogleUsePreReleaseUpdate(value: boolean) {
this.store.dispatch(new TogglePreReleaseFlagAction(value));
}
checkForUpdate() {
this.store.dispatch(new CheckForUpdateNowAction());
}
}

View File

@@ -0,0 +1,10 @@
import { Routes } from '@angular/router';
import { SettingsComponent } from './settings.component';
export const settingsRoutes: Routes = [
{
path: 'settings',
component: SettingsComponent
}
];