From 8800053905d19c2bfb403d822ecbc661e1e4dc2e Mon Sep 17 00:00:00 2001 From: Adrian Missy Date: Wed, 27 Apr 2022 09:12:12 -0500 Subject: [PATCH 1/2] feat: Add keyboard shortcuts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implement keyboard shortcuts for the board view and individual cards Signed-off-by: Adrian Missy Signed-off-by: Julius Härtl --- README.md | 4 +- src/App.vue | 3 + src/components/Controls.vue | 48 +++- src/components/KeyboardShortcuts.vue | 279 ++++++++++++++++++++ src/components/board/Board.vue | 3 +- src/components/cards/CardItem.vue | 89 ++++++- src/components/modals/HelpModal.vue | 228 ++++++++++++++++ src/components/navigation/AppNavigation.vue | 16 +- src/store/card.js | 2 +- src/store/main.js | 8 +- src/views/CreateNewCardCustomPicker.vue | 2 +- 11 files changed, 661 insertions(+), 21 deletions(-) create mode 100644 src/components/KeyboardShortcuts.vue create mode 100644 src/components/modals/HelpModal.vue diff --git a/README.md b/README.md index 82d18f83b..d90dd9d00 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ You can enable HMR (Hot module replacement) to avoid page reloads when working o ### Docker: Simple app development container -- Fork the app +- Fork the app - Clone the repository: `git clone https://github.com/nextcloud/deck.git` - Go into deck directory: `cd deck` - Build the app as described in the general build instructions @@ -93,7 +93,7 @@ docker run --rm \ ### Full Nextcloud development environment You need to setup a [development environment](https://docs.nextcloud.com/server/latest/developer_manual//getting_started/devenv.html) of the current Nextcloud version. You can also alternatively install & run the [nextcloud docker container](https://github.com/juliushaertl/nextcloud-docker-dev). -After the finished installation, you can clone the deck project directly in the `/[nextcloud-docker-dev-dir]/workspace/server/apps/` folder. +After the finished installation, you can clone the deck project directly in the `/[nextcloud-docker-dev-dir]/workspace/server/apps/` folder. ### Running tests You can use the provided Makefile to run all tests by using: diff --git a/src/App.vue b/src/App.vue index c1fc4eaa8..fdc3bd125 100644 --- a/src/App.vue +++ b/src/App.vue @@ -40,12 +40,14 @@ + diff --git a/src/components/KeyboardShortcuts.vue b/src/components/KeyboardShortcuts.vue new file mode 100644 index 000000000..8445550e9 --- /dev/null +++ b/src/components/KeyboardShortcuts.vue @@ -0,0 +1,279 @@ + + + diff --git a/src/components/board/Board.vue b/src/components/board/Board.vue index 6b371d338..a56747b6d 100644 --- a/src/components/board/Board.vue +++ b/src/components/board/Board.vue @@ -21,7 +21,7 @@ --> @@ -253,16 +326,16 @@ export default { cursor: pointer; } - &:hover { - border: 2px solid var(--color-border-dark); - } &.current-card { border: 2px solid var(--color-primary-element); } &:focus, &:focus-visible, &:focus-within { outline: none; - border: 2px solid var(--color-primary-element); + border: 2px solid var(--color-border-maxcontrast); + &.current-card { + border: 2px solid var(--color-primary-element); + } } .card-upper { diff --git a/src/components/modals/HelpModal.vue b/src/components/modals/HelpModal.vue new file mode 100644 index 000000000..c1e41f2ab --- /dev/null +++ b/src/components/modals/HelpModal.vue @@ -0,0 +1,228 @@ + + + + + diff --git a/src/components/navigation/AppNavigation.vue b/src/components/navigation/AppNavigation.vue index 0ab0db3ea..ee8339f8e 100644 --- a/src/components/navigation/AppNavigation.vue +++ b/src/components/navigation/AppNavigation.vue @@ -62,6 +62,10 @@