feat: Add keyboard shortcuts

Implement keyboard shortcuts for the board view and individual cards

Signed-off-by: Adrian Missy <adrian.missy@onewavestudios.com>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Adrian Missy
2022-04-27 09:12:12 -05:00
committed by backportbot-nextcloud[bot]
parent 0a77443c5c
commit 8800053905
11 changed files with 661 additions and 21 deletions

View File

@@ -50,7 +50,7 @@ export default {
if (users.length > 0) {
users.forEach((user) => {
if (card.assignedUsers.findIndex((u) => u.participant.uid === user) === -1) {
if (!card?.assignedUsers || card.assignedUsers.findIndex((u) => u.participant.uid === user) === -1) {
allUsersMatch = false
}
})

View File

@@ -74,6 +74,7 @@ export default new Vuex.Store({
activity: [],
activityLoadMore: true,
filter: { tags: [], users: [], due: '' },
shortcutLock: false,
},
getters: {
config: state => (key) => {
@@ -307,7 +308,9 @@ export default new Vuex.Store({
Vue.delete(state.currentBoard.acl, removeIndex)
}
},
TOGGLE_SHORTCUT_LOCK(state, lock) {
state.shortcutLock = lock
},
},
actions: {
async setConfig({ commit }, config) {
@@ -515,5 +518,8 @@ export default new Vuex.Store({
newOwner,
})
},
toggleShortcutLock({ commit }, lock) {
commit('TOGGLE_SHORTCUT_LOCK', lock)
},
},
})