Add the "Export device configuration" button instead of the export link. Make the button export JSON by default and BIN when pressed with Shift.

This commit is contained in:
László Monda
2018-03-29 18:44:09 +02:00
parent 2476049681
commit bf94370f2f
2 changed files with 11 additions and 3 deletions

View File

@@ -34,6 +34,14 @@ export class DeviceConfigurationComponent {
this.store.dispatch(new SaveUserConfigInBinaryFileAction());
}
exportUserConfiguration(event: MouseEvent) {
if (event.shiftKey) {
this.saveConfigurationInBINFormat();
} else {
this.saveConfigurationInJSONFormat();
}
}
changeFile(event): void {
const files = event.srcElement.files;
const fileReader = new FileReader();