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

@@ -34,5 +34,6 @@
data-original-title="Duplicate keymap"
(click)="duplicateKeymap()"
></i>
<i class="fa fa-download layer__download pull-right" title="Download layer" (click)="onDownloadIconClick()"></i>
</h1>
</div>

View File

@@ -43,6 +43,18 @@
}
}
.layer__download {
top: 10px;
font-size: 0.8em;
position: relative;
margin-right: 10px;
&:hover {
cursor: pointer;
color: $icon-hover;
}
}
.pane-title {
margin-bottom: 1em;

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();
}
}