feat(config): Add deviceName to the user config (#474)

* add device name to configuration

* feat(config): Rename user configuration

* style: fix tslint error

* test: Fix unit tests

* test: Add UserConfiguration device name test

* set device name if faild the user-config read from device

* feat(device): Remove the first 0 from USB[W] dump
This commit is contained in:
Róbert Kiss
2017-10-28 20:16:59 +02:00
committed by László Monda
parent 9885439b10
commit cdc4a169de
13 changed files with 141 additions and 18 deletions

View File

@@ -25,6 +25,7 @@ import {
import {
ActionTypes,
LoadUserConfigSuccessAction,
RenameUserConfigurationAction,
SaveUserConfigSuccessAction
} from '../actions/user-config';
@@ -72,8 +73,9 @@ export class UserConfigEffects {
KeymapActions.ADD, KeymapActions.DUPLICATE, KeymapActions.EDIT_NAME, KeymapActions.EDIT_ABBR,
KeymapActions.SET_DEFAULT, KeymapActions.REMOVE, KeymapActions.SAVE_KEY,
MacroActions.ADD, MacroActions.DUPLICATE, MacroActions.EDIT_NAME, MacroActions.REMOVE, MacroActions.ADD_ACTION,
MacroActions.SAVE_ACTION, MacroActions.DELETE_ACTION, MacroActions.REORDER_ACTION) as
Observable<KeymapAction | MacroAction>)
MacroActions.SAVE_ACTION, MacroActions.DELETE_ACTION, MacroActions.REORDER_ACTION,
ActionTypes.RENAME_USER_CONFIGURATION) as
Observable<KeymapAction | MacroAction | RenameUserConfigurationAction>)
.withLatestFrom(this.store.select(getUserConfiguration), this.store.select(getPrevUserConfiguration))
.mergeMap(([action, config, prevUserConfiguration]) => {
this.dataStorageRepository.saveConfig(config);