mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 11:39:21 +03:00
There this works
This commit is contained in:
parent
3a48cc8b7f
commit
c7054ff56c
19 changed files with 32 additions and 441 deletions
|
|
@ -26,7 +26,7 @@ class MenuSettingsAdminView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
onBuild(dom) {
|
||||
shortcuts.add(['arrowup','arrowdown'], '', KeyState.Settings,
|
||||
shortcuts.add('arrowup,arrowdown', '', KeyState.Settings,
|
||||
settingsMenuKeysHandler(dom.querySelectorAll('.b-admin-menu .e-item')));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ class AskPopupView extends AbstractViewNext {
|
|||
|
||||
onBuild() {
|
||||
// shortcuts.add('tab', 'shift', KeyState.PopupAsk, () => {
|
||||
shortcuts.add(['tab','arrowright','arrowleft'], '', KeyState.PopupAsk, () => {
|
||||
shortcuts.add('tab,arrowright,arrowleft', '', KeyState.PopupAsk, () => {
|
||||
let btn = this.querySelector('.buttonYes');
|
||||
if (btn.matches(':focus')) {
|
||||
btn = this.querySelector('.buttonNo');
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ class ComposeOpenPgpPopupView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
onBuild() {
|
||||
// shortcuts.add(('tab', 'shift', KeyState.PopupComposeOpenPGP, () => {
|
||||
// shortcuts.add('tab', 'shift', KeyState.PopupComposeOpenPGP, () => {
|
||||
shortcuts.add('tab', '', KeyState.PopupComposeOpenPGP, () => {
|
||||
let btn = this.querySelector('.inputPassword');
|
||||
if (btn.matches(':focus')) {
|
||||
|
|
|
|||
|
|
@ -611,7 +611,7 @@ class ContactsPopupView extends AbstractViewNext {
|
|||
return false;
|
||||
});
|
||||
|
||||
shortcuts.add(['c','w'], '', KeyState.ContactList, () => {
|
||||
shortcuts.add('c,w', '', KeyState.ContactList, () => {
|
||||
this.newMessageCommand();
|
||||
return false;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class KeyboardShortcutsHelpPopupView extends AbstractViewNext {
|
|||
dom.querySelectorAll('a[data-toggle="tab"]').forEach(node => node.Tab || new BSN.Tab(node));
|
||||
|
||||
// shortcuts.add('tab', 'shift',
|
||||
shortcuts.add(['tab','arrowleft','arrowright'], '',
|
||||
shortcuts.add('tab,arrowleft,arrowright', '',
|
||||
KeyState.PopupKeyboardShortcutsHelp,
|
||||
((event, handler)=>{
|
||||
if (event && handler) {
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class MessageOpenPgpPopupView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
onBuild(oDom) {
|
||||
// shortcuts.add('tab','shift', KeyState.PopupMessageOpenPGP, () => {
|
||||
// shortcuts.add('tab', 'shift', KeyState.PopupMessageOpenPGP, () => {
|
||||
shortcuts.add('tab', '', KeyState.PopupMessageOpenPGP, () => {
|
||||
let btn = this.querySelector('.inputPassword');
|
||||
if (btn.matches(':focus')) {
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class FolderListMailBoxUserView extends AbstractViewNext {
|
|||
el && fSelectFolder(el, event, false);
|
||||
});
|
||||
|
||||
shortcuts.add(['arrowup','arrowdown'], '', KeyState.FolderList, event => {
|
||||
shortcuts.add('arrowup,arrowdown', '', KeyState.FolderList, event => {
|
||||
let items = [], index = 0;
|
||||
dom.querySelectorAll('.b-folders .e-item .e-link:not(.hidden)').forEach(node => {
|
||||
if (node.offsetHeight || node.getClientRects().length) {
|
||||
|
|
@ -168,7 +168,7 @@ class FolderListMailBoxUserView extends AbstractViewNext {
|
|||
});
|
||||
|
||||
// shortcuts.add('tab', 'shift', KeyState.FolderList, () => {
|
||||
shortcuts.add(['escape','tab','arrowright'], '', KeyState.FolderList, () => {
|
||||
shortcuts.add('escape,tab,arrowright', '', KeyState.FolderList, () => {
|
||||
AppStore.focusedState(Focused.MessageList);
|
||||
moveAction(false);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -786,7 +786,7 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
|||
|
||||
if (Settings.capa(Capa.Composer)) {
|
||||
// write/compose (open compose popup)
|
||||
shortcuts.add(['w','c'], '', [KeyState.MessageList, KeyState.MessageView], () => {
|
||||
shortcuts.add('w,c', '', [KeyState.MessageList, KeyState.MessageView], () => {
|
||||
showScreenPopup(require('View/Popup/Compose'));
|
||||
return false;
|
||||
});
|
||||
|
|
@ -877,7 +877,7 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
|||
AppStore.focusedState(Focused.FolderList);
|
||||
return false;
|
||||
});
|
||||
shortcuts.add(['tab','arrowright'], '', KeyState.MessageList, () => {
|
||||
shortcuts.add('tab,arrowright', '', KeyState.MessageList, () => {
|
||||
this.message() && AppStore.focusedState(Focused.MessageView);
|
||||
return false;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -547,7 +547,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
|
||||
initShortcuts() {
|
||||
// exit fullscreen, back
|
||||
shortcuts.add(['escape','backspace'], '', KeyState.MessageView, this.escShortcuts.bind(this));
|
||||
shortcuts.add('escape,backspace', '', KeyState.MessageView, this.escShortcuts.bind(this));
|
||||
|
||||
// fullscreen
|
||||
shortcuts.add('enter', '', KeyState.MessageView, () => {
|
||||
|
|
@ -602,12 +602,12 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
return true;
|
||||
});
|
||||
|
||||
shortcuts.add(['arrowup','arrowleft'], 'meta', [KeyState.MessageList, KeyState.MessageView], () => {
|
||||
shortcuts.add('arrowup,arrowleft', 'meta', [KeyState.MessageList, KeyState.MessageView], () => {
|
||||
this.goUpCommand();
|
||||
return false;
|
||||
});
|
||||
|
||||
shortcuts.add(['arrowdown','arrowright'], 'meta', [KeyState.MessageList, KeyState.MessageView], () => {
|
||||
shortcuts.add('arrowdown,arrowright', 'meta', [KeyState.MessageList, KeyState.MessageView], () => {
|
||||
this.goDownCommand();
|
||||
return false;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class MenuSettingsUserView extends AbstractViewNext {
|
|||
);
|
||||
}
|
||||
|
||||
shortcuts.add(['ArrowUp','ArrowDown'], '', KeyState.Settings,
|
||||
shortcuts.add('arrowup,arrowdown', '', KeyState.Settings,
|
||||
settingsMenuKeysHandler(dom.querySelectorAll('.b-settings-menu .e-item')));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue