feat(device): Add confirmation question before reset the configuration (#449)
* feat(device): Add confirmation question before reset the configuration * feat(device): text change * style: fix ts-lint error
This commit is contained in:
committed by
László Monda
parent
6b46c85ca6
commit
a4056a8b8b
@@ -6,8 +6,13 @@
|
||||
<ul class="list-unstyled btn-list">
|
||||
<li>
|
||||
<button class="btn btn-danger"
|
||||
(click)="resetUserConfiguration()">Reset user configuration including all your keymaps and macros
|
||||
</button>
|
||||
mwlConfirmationPopover
|
||||
title="Are you sure?"
|
||||
placement="bottom"
|
||||
confirmText="Yes"
|
||||
cancelText="No"
|
||||
(confirm)="resetUserConfiguration()">Reset user configuration
|
||||
</button> - including all your keymaps and macros
|
||||
</li>
|
||||
<li>
|
||||
<button class="btn btn-default"
|
||||
|
||||
@@ -22,11 +22,11 @@ export class DeviceSettingsComponent {
|
||||
this.store.dispatch(new ResetUserConfigurationAction());
|
||||
}
|
||||
|
||||
saveConfigurationInJSONFormat(){
|
||||
saveConfigurationInJSONFormat() {
|
||||
this.store.dispatch(new SaveUserConfigInJsonFileAction());
|
||||
}
|
||||
|
||||
saveConfigurationInBINFormat(){
|
||||
saveConfigurationInBINFormat() {
|
||||
this.store.dispatch(new SaveUserConfigInBinaryFileAction());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { NotifierModule } from 'angular-notifier';
|
||||
import { ConfirmationPopoverModule } from 'angular-confirmation-popover';
|
||||
|
||||
import { DragulaModule } from 'ng2-dragula/ng2-dragula';
|
||||
import { Select2Module } from 'ng2-select2/ng2-select2';
|
||||
@@ -163,7 +164,10 @@ import { UhkDeviceLoadedGuard } from './services/uhk-device-loaded.guard';
|
||||
DragulaModule,
|
||||
routing,
|
||||
Select2Module,
|
||||
NotifierModule.withConfig(angularNotifierConfig)
|
||||
NotifierModule.withConfig(angularNotifierConfig),
|
||||
ConfirmationPopoverModule.forRoot({
|
||||
confirmButtonType: 'danger' // set defaults here
|
||||
})
|
||||
],
|
||||
providers: [
|
||||
SvgModuleProviderService,
|
||||
|
||||
Reference in New Issue
Block a user