From 3f42fd24feadf555cf8f9511127325c0b147001f Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 16 Oct 2018 13:32:37 +1100 Subject: [PATCH] keyboard shortcuts --- client/package.json | 2 ++ client/src/components/cryp.list.jsx | 2 +- client/src/components/login.component.jsx | 2 +- client/src/keyboard.jsx | 18 ++++++++++++++++++ client/src/main.jsx | 3 ++- server/WORKLOG.md | 3 ++- 6 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 client/src/keyboard.jsx diff --git a/client/package.json b/client/package.json index 86eec3b0..eea90bd9 100755 --- a/client/package.json +++ b/client/package.json @@ -15,6 +15,8 @@ "bulma-toast": "^1.2.0", "docco": "^0.7.0", "jdenticon": "^2.1.0", + "key": "^0.1.11", + "keymaster": "^1.6.2", "preact": "^8.3.1", "preact-redux": "^2.0.3", "redux": "^4.0.0" diff --git a/client/src/components/cryp.list.jsx b/client/src/components/cryp.list.jsx index 843bfdeb..2dceedae 100644 --- a/client/src/components/cryp.list.jsx +++ b/client/src/components/cryp.list.jsx @@ -9,7 +9,7 @@ function CrypList({ cryps, activeItem, sendCombatPve, sendItemUse }) { className="tile is-vertical box" style={activeItem ? { cursor: 'pointer' } : {}} onClick={() => sendItemUse(cryp.id)} > -
+

{cryp.name}

diff --git a/client/src/components/login.component.jsx b/client/src/components/login.component.jsx index 4a17ecde..85733c04 100644 --- a/client/src/components/login.component.jsx +++ b/client/src/components/login.component.jsx @@ -43,7 +43,7 @@ function renderLogin({ account, submitLogin }) {