3 Commits

Author SHA1 Message Date
Róbert Kiss
38c60d9cc0 fix: keyboard description z-index 2019-08-03 11:29:30 +02:00
Róbert Kiss
f6bef928fe chore(usb): add kboot-firmware-upgrade script (#1006) 2019-08-02 02:51:07 +02:00
Róbert Kiss
5ab5ad5f0c feat: ESC cancel the keymap description editing (#1007) 2019-07-31 10:03:29 +02:00
5 changed files with 26 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
import { Device, devices } from 'node-hid';
import { readFile } from 'fs-extra';
import { EOL } from 'os';
import MemoryMap from 'nrf-intel-hex';
import * as MemoryMap from 'nrf-intel-hex';
import { LogService } from 'uhk-common';
import { Constants, UsbCommand } from './constants';

View File

@@ -15,6 +15,7 @@
<textarea class="text-editor"
[(ngModel)]="text"
autofocus
(keydown.escape)="cancelEditText()"
(keydown.control.enter)="keydownEnter()"
(keydown.alt.enter)="keydownEnter()"></textarea>
<div class="pull-right buttons">

View File

@@ -1,4 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg"
class="svgKeyboard"
[attr.viewBox]="viewBox"
height="100%"
width="100%">

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -3,8 +3,14 @@
width: 100%;
position: relative;
}
.svgKeyboard {
z-index: 50;
}
editable-text {
padding-left: 2em;
padding-right: 2em;
display: block;
z-index: 51;
}

View File

@@ -0,0 +1,17 @@
import * as path from 'path';
import { LogService } from 'uhk-common';
import { UhkHidDevice, UhkOperations } from 'uhk-usb';
const logService = new LogService();
const rootDir = path.join(__dirname, '../../tmp');
const uhkHidDevice = new UhkHidDevice(logService, {}, rootDir);
const uhkOperations = new UhkOperations(logService, uhkHidDevice, rootDir);
uhkOperations
.updateRightFirmware()
.then(() => uhkOperations.updateLeftModule())
.then(() => console.log('Firmware upgrade finished'))
.catch(error => {
console.error(error);
process.exit(-1);
});