Cleanup in keypress-tab component

This commit is contained in:
József Farkas
2016-06-11 17:31:59 +02:00
parent 7ea36c308a
commit 13229dc2b6
3 changed files with 20 additions and 6 deletions

View File

@@ -1,4 +1,17 @@
:host { :host {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.long-press-container {
display: flex;
margin-top: 3rem;
b {
margin-right: 0.6em;
}
.secondary-role {
width: 135px;
}
icon {
margin-left: 0.6em;
}
}
} }

View File

@@ -8,6 +8,8 @@ import { KeystrokeModifiersAction } from '../../../../config-serializer/config-i
import { KeystrokeWithModifiersAction } from '../../../../config-serializer/config-items/KeystrokeWithModifiersAction'; import { KeystrokeWithModifiersAction } from '../../../../config-serializer/config-items/KeystrokeWithModifiersAction';
import { KeyActionSaver } from '../key-action-saver'; import { KeyActionSaver } from '../key-action-saver';
import {IconComponent} from '../widgets/icon.component';
@Component({ @Component({
moduleId: module.id, moduleId: module.id,
selector: 'keypress-tab', selector: 'keypress-tab',
@@ -35,9 +37,9 @@ import { KeyActionSaver } from '../key-action-saver';
</div> </div>
</div> </div>
</div> </div>
<div style="margin-top: 3rem;"> <div class="long-press-container">
<b class="setting-label" style="position:relative;">Long press action:</b> <b class="setting-label" style="position:relative;">Long press action:</b>
<select class="secondary-role" style="width:135px"> <select class="secondary-role">
<option> None </option> <option> None </option>
<optgroup label="Modifiers"> <optgroup label="Modifiers">
<option> LShift </option> <option> LShift </option>
@@ -55,13 +57,11 @@ import { KeyActionSaver } from '../key-action-saver';
<option> Fn </option> <option> Fn </option>
</optgroup> </optgroup>
</select> </select>
<i class="fa fa-question-circle" style="margin-left:5px" data-toggle="tooltip" data-placement="right" <icon name="question-circle" title="This action happens when the key is being held along with another key."></icon>
title="This action happens when the key is being held along with another key.">
</i>
</div> </div>
`, `,
styles: [require('./keypress-tab.component.scss')], styles: [require('./keypress-tab.component.scss')],
directives: [CaptureKeystrokeButtonComponent] directives: [CaptureKeystrokeButtonComponent, IconComponent]
}) })
export class KeypressTabComponent implements OnInit, KeyActionSaver { export class KeypressTabComponent implements OnInit, KeyActionSaver {
private leftModifiers: string[]; private leftModifiers: string[];

View File

@@ -13,6 +13,7 @@ import { NgSwitch, NgSwitchWhen } from '@angular/common';
<i *ngSwitchWhen="'clock'" class="fa fa-clock-o"></i> <i *ngSwitchWhen="'clock'" class="fa fa-clock-o"></i>
<i *ngSwitchWhen="'trash'" class="glyphicon glyphicon-trash action--trash"></i> <i *ngSwitchWhen="'trash'" class="glyphicon glyphicon-trash action--trash"></i>
<i *ngSwitchWhen="'pencil'" class="glyphicon glyphicon-pencil action--edit"></i> <i *ngSwitchWhen="'pencil'" class="glyphicon glyphicon-pencil action--edit"></i>
<i *ngSwitchWhen="'question-circle'" class ="fa fa-question-circle"></i>
</div> </div>
`, `,
directives: [NgSwitch, NgSwitchWhen], directives: [NgSwitch, NgSwitchWhen],