@@ -8,6 +8,7 @@ import { Tab } from '../tab';
8
8
9
9
import { AppState , getMacros } from '../../../../store' ;
10
10
import { SelectedKeyModel } from '../../../../models' ;
11
+ import { RemapInfo } from '../../../../models/remap-info' ;
11
12
import { SelectOptionData } from '../../../../models/select-option-data' ;
12
13
13
14
@Component ( {
@@ -20,6 +21,7 @@ export class MacroTabComponent extends Tab implements OnInit, OnChanges, OnDestr
20
21
@Input ( ) currentKeymap : Keymap ;
21
22
@Input ( ) defaultKeyAction : KeyAction ;
22
23
@Input ( ) macroPlaybackSupported : boolean ;
24
+ @Input ( ) remapInfo : RemapInfo ;
23
25
@Input ( ) selectedKey : SelectedKeyModel ;
24
26
25
27
@Output ( ) assignNewMacro = new EventEmitter < void > ( ) ;
@@ -54,8 +56,14 @@ export class MacroTabComponent extends Tab implements OnInit, OnChanges, OnDestr
54
56
this . validAction . emit ( true ) ;
55
57
56
58
if ( changes . currentKeymap || changes . selectedKey ) {
59
+ let remapQueryParams = '' ;
60
+
61
+ if ( this . remapInfo ) {
62
+ remapQueryParams = `&remapOnAllKeymap=${ this . remapInfo . remapOnAllKeymap } &remapOnAllLayer=${ this . remapInfo . remapOnAllLayer } ` ;
63
+ }
64
+
57
65
this . jumpToMacroQueryParams = {
58
- backUrl : `/keymap/${ this . currentKeymap . abbreviation } ?layer=${ this . selectedKey . layerId } &module=${ this . selectedKey . moduleId } &key=${ this . selectedKey . keyId } ` ,
66
+ backUrl : `/keymap/${ this . currentKeymap . abbreviation } ?layer=${ this . selectedKey . layerId } &module=${ this . selectedKey . moduleId } &key=${ this . selectedKey . keyId } ${ remapQueryParams } ` ,
59
67
backText : `"${ this . currentKeymap . name } " keymap` ,
60
68
} ;
61
69
}
0 commit comments