committed by
József Farkas
parent
1d47f9c758
commit
ac499d21f7
@@ -35,6 +35,7 @@ enum TabName {
|
||||
})
|
||||
export class PopoverComponent implements OnInit {
|
||||
@Input() defaultKeyAction: KeyAction;
|
||||
@Input() currentKeymap: Keymap;
|
||||
|
||||
@Output() cancel = new EventEmitter<any>();
|
||||
@Output() remap = new EventEmitter<KeyAction>();
|
||||
@@ -49,7 +50,10 @@ export class PopoverComponent implements OnInit {
|
||||
private keymaps$: Observable<Keymap[]>;
|
||||
|
||||
constructor(private store: Store<AppState>) {
|
||||
this.keymaps$ = store.let(getKeymapEntities());
|
||||
this.keymaps$ = store.let(getKeymapEntities())
|
||||
.map((keymaps: Keymap[]) =>
|
||||
keymaps.filter((keymap: Keymap) => this.currentKeymap.abbreviation !== keymap.abbreviation)
|
||||
);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -24,12 +24,13 @@ export class KeymapTabComponent implements OnInit, Tab {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.keymapOptions = this.keymaps.map((keymap: Keymap): Select2OptionData => {
|
||||
return {
|
||||
id: keymap.abbreviation,
|
||||
text: keymap.name
|
||||
};
|
||||
});
|
||||
this.keymapOptions = this.keymaps
|
||||
.map((keymap: Keymap): Select2OptionData => {
|
||||
return {
|
||||
id: keymap.abbreviation,
|
||||
text: keymap.name
|
||||
};
|
||||
});
|
||||
|
||||
this.keymapOptions = [
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
>
|
||||
</svg-keyboard>
|
||||
</div>
|
||||
<popover *ngIf="popoverShown" [defaultKeyAction]="popoverInitKeyAction" (cancel)="hidePopover()" (remap)="onRemap($event)"></popover>
|
||||
<popover *ngIf="popoverShown" [defaultKeyAction]="popoverInitKeyAction" [currentKeymap]="keymap" (cancel)="hidePopover()" (remap)="onRemap($event)"></popover>
|
||||
<div class="tooltip top fade" role="tooltip"
|
||||
[class.in]="tooltipData.shown"
|
||||
[style.top.px]="tooltipData.posTop"
|
||||
|
||||
Reference in New Issue
Block a user