mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
Move card to archive, add shortcut key ÷ for Persian keyboard.
Thanks to mohammadZahedian and xet7 ! Fixes https://github.com/wekan/wekan/pull/5589, fixes https://github.com/wekan/wekan/pull/5576.
This commit is contained in:
parent
aa46b42356
commit
80ea1782f9
1 changed files with 23 additions and 1 deletions
|
|
@ -210,6 +210,28 @@ Mousetrap.bind('`', evt => {
|
|||
}
|
||||
});
|
||||
|
||||
// Same as above, this time for Persian keyboard.
|
||||
// https://github.com/wekan/wekan/pull/5589#issuecomment-2516776519
|
||||
Mousetrap.bind('÷', evt => {
|
||||
const cardId = getSelectedCardId();
|
||||
if (!cardId) {
|
||||
return;
|
||||
}
|
||||
|
||||
const currentUserId = Meteor.userId();
|
||||
if (currentUserId === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Utils.canModifyBoard()) {
|
||||
const card = ReactiveCache.getCard(cardId);
|
||||
card.archive();
|
||||
// We should prevent scrolling in card when spacebar is clicked
|
||||
// This should do it according to Mousetrap docs, but it doesn't
|
||||
evt.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
Mousetrap.bind('n', evt => {
|
||||
const cardId = getSelectedCardId();
|
||||
if (!cardId) {
|
||||
|
|
@ -285,7 +307,7 @@ Template.keyboardShortcuts.helpers({
|
|||
action: 'shortcut-assign-self',
|
||||
},
|
||||
{
|
||||
keys: ['`'],
|
||||
keys: ['`', '÷'],
|
||||
action: 'archive-card',
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue