mirror of
https://github.com/miniflux/v2.git
synced 2025-09-30 19:22:11 +00:00
chore(js): format JavaScript code with Prettier
This commit is contained in:
parent
cce0e7bd29
commit
f0575d64bc
10 changed files with 162 additions and 128 deletions
|
@ -46,9 +46,11 @@ class KeyboardHandler {
|
|||
}
|
||||
|
||||
isEventIgnored(event, key) {
|
||||
return event.target.tagName === "INPUT" ||
|
||||
return (
|
||||
event.target.tagName === "INPUT" ||
|
||||
event.target.tagName === "TEXTAREA" ||
|
||||
(this.queue.length < 1 && !this.triggers.has(key));
|
||||
(this.queue.length < 1 && !this.triggers.has(key))
|
||||
);
|
||||
}
|
||||
|
||||
static isModifierKeyDown(event) {
|
||||
|
@ -57,12 +59,18 @@ class KeyboardHandler {
|
|||
|
||||
static getKey(event) {
|
||||
switch (event.key) {
|
||||
case 'Esc': return 'Escape';
|
||||
case 'Up': return 'ArrowUp';
|
||||
case 'Down': return 'ArrowDown';
|
||||
case 'Left': return 'ArrowLeft';
|
||||
case 'Right': return 'ArrowRight';
|
||||
default: return event.key;
|
||||
case "Esc":
|
||||
return "Escape";
|
||||
case "Up":
|
||||
return "ArrowUp";
|
||||
case "Down":
|
||||
return "ArrowDown";
|
||||
case "Left":
|
||||
return "ArrowLeft";
|
||||
case "Right":
|
||||
return "ArrowRight";
|
||||
default:
|
||||
return event.key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue