feat(agent): Add 'Device' menu and submenus (#461)

This commit is contained in:
Róbert Kiss
2017-10-18 01:28:02 +02:00
committed by László Monda
parent 041d4debb6
commit ab88d8a2e7
14 changed files with 111 additions and 20 deletions

View File

@@ -0,0 +1,32 @@
import { Component } from '@angular/core';
import { Store } from '@ngrx/store';
import { AppState } from '../../../store';
import { ResetUserConfigurationAction } from '../../../store/actions/device';
import { SaveUserConfigInBinaryFileAction, SaveUserConfigInJsonFileAction } from '../../../store/actions/user-config';
@Component({
selector: 'device-settings',
templateUrl: './device-configuration.component.html',
styleUrls: ['./device-configuration.component.scss'],
host: {
'class': 'container-fluid'
}
})
export class DeviceConfigurationComponent {
constructor(private store: Store<AppState>) {
}
resetUserConfiguration() {
this.store.dispatch(new ResetUserConfigurationAction());
}
saveConfigurationInJSONFormat() {
this.store.dispatch(new SaveUserConfigInJsonFileAction());
}
saveConfigurationInBINFormat() {
this.store.dispatch(new SaveUserConfigInBinaryFileAction());
}
}