File tree Expand file tree Collapse file tree 4 files changed +34
-16
lines changed
components/device/settings Expand file tree Collapse file tree 4 files changed +34
-16
lines changed Original file line number Diff line number Diff line change @@ -59,18 +59,4 @@ export class MainAppComponent {
5959 clickedOnProgressButton ( action : Action ) {
6060 return this . store . dispatch ( action ) ;
6161 }
62-
63- @HostListener ( 'window:keydown.alt.j' , [ '$event' ] )
64- onAltJ ( event : KeyboardEvent ) : void {
65- event . preventDefault ( ) ;
66- event . stopPropagation ( ) ;
67- this . store . dispatch ( new SaveUserConfigInJsonFileAction ( ) ) ;
68- }
69-
70- @HostListener ( 'window:keydown.alt.b' , [ '$event' ] )
71- onAltB ( event : KeyboardEvent ) : void {
72- event . preventDefault ( ) ;
73- event . stopPropagation ( ) ;
74- this . store . dispatch ( new SaveUserConfigInBinaryFileAction ( ) ) ;
75- }
7662}
Original file line number Diff line number Diff line change 11< h1 >
22 < i class ="fa fa-cog "> </ i >
3- < span > Device settings... </ span >
3+ < span > Device settings</ span >
44</ h1 >
5- < a (click) ="resetUserConfiguration() "> Reset user configuration</ a >
5+
6+ < ul class ="list-unstyled btn-list ">
7+ < li >
8+ < button class ="btn btn-danger "
9+ (click) ="resetUserConfiguration() "> Reset user configuration including all your keymaps and macros
10+ </ button >
11+ </ li >
12+ < li >
13+ < button class ="btn btn-default "
14+ (click) ="saveConfigurationInJSONFormat() "> Save device JSON configuration
15+ </ button >
16+ </ li >
17+ < li >
18+ < button class ="btn btn-default "
19+ (click) ="saveConfigurationInBINFormat() "> Save device binary configuration
20+ </ button >
21+ </ li >
22+ </ ul >
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { Store } from '@ngrx/store';
33
44import { AppState } from '../../../store' ;
55import { ResetUserConfigurationAction } from '../../../store/actions/device' ;
6+ import { SaveUserConfigInBinaryFileAction , SaveUserConfigInJsonFileAction } from '../../../store/actions/user-config' ;
67
78@Component ( {
89 selector : 'device-settings' ,
@@ -20,4 +21,12 @@ export class DeviceSettingsComponent {
2021 resetUserConfiguration ( ) {
2122 this . store . dispatch ( new ResetUserConfigurationAction ( ) ) ;
2223 }
24+
25+ saveConfigurationInJSONFormat ( ) {
26+ this . store . dispatch ( new SaveUserConfigInJsonFileAction ( ) ) ;
27+ }
28+
29+ saveConfigurationInBINFormat ( ) {
30+ this . store . dispatch ( new SaveUserConfigInBinaryFileAction ( ) ) ;
31+ }
2332}
Original file line number Diff line number Diff line change 5959.select2-container--default .select2-dropdown--below .select2-results > .select2-results__options {
6060 max-height : 300px ;
6161}
62+
63+ ul .btn-list {
64+ & li {
65+ margin-top : 0.5em ;
66+ }
67+ }
You can’t perform that action at this time.
0 commit comments