Add keymap downloading

Closes #199
This commit is contained in:
Farkas József
2017-02-10 18:55:49 +01:00
committed by József Farkas
parent 61c20cd678
commit 8aa2029f55
12 changed files with 74 additions and 8 deletions

View File

@@ -3,6 +3,8 @@ import {
Component,
ElementRef,
Input,
Output,
EventEmitter,
OnChanges,
Renderer,
SimpleChanges,
@@ -25,6 +27,7 @@ import { KeymapActions } from '../../../store/actions';
export class KeymapHeaderComponent implements OnChanges {
@Input() keymap: Keymap;
@Input() deletable: boolean;
@Output() downloadClick = new EventEmitter<void>();
@ViewChild('name') keymapName: ElementRef;
@ViewChild('abbr') keymapAbbr: ElementRef;
@@ -87,4 +90,8 @@ export class KeymapHeaderComponent implements OnChanges {
setTrashTitle(): void {
this.trashTitle = this.deletable ? '' : 'The last keymap cannot be deleted.';
}
onDownloadIconClick(): void {
this.downloadClick.emit();
}
}