mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 15:45:55 +08:00
Drop useless messagelist_actions feature
This commit is contained in:
parent
00088ef547
commit
fa136cd529
|
@ -11,7 +11,6 @@ export const Capa = {
|
|||
Search: 'SEARCH',
|
||||
SearchAdv: 'SEARCH_ADV',
|
||||
MessageActions: 'MESSAGE_ACTIONS',
|
||||
MessageListActions: 'MESSAGELIST_ACTIONS',
|
||||
AttachmentsActions: 'ATTACHMENTS_ACTIONS',
|
||||
DangerousActions: 'DANGEROUS_ACTIONS',
|
||||
Settings: 'SETTINGS',
|
||||
|
|
|
@ -62,7 +62,6 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
this.allowReload = Settings.capa(Capa.Reload);
|
||||
this.allowSearch = Settings.capa(Capa.Search);
|
||||
this.allowSearchAdv = Settings.capa(Capa.SearchAdv);
|
||||
this.allowMessageListActions = Settings.capa(Capa.MessageListActions);
|
||||
this.allowDangerousActions = Settings.capa(Capa.DangerousActions);
|
||||
|
||||
this.messageList = MessageUserStore.list;
|
||||
|
@ -754,24 +753,22 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
}
|
||||
});
|
||||
|
||||
if (Settings.capa(Capa.MessageListActions)) {
|
||||
// archive (zip)
|
||||
shortcuts.add('z', '', [Scope.MessageList, Scope.MessageView], () => {
|
||||
this.archiveCommand();
|
||||
return false;
|
||||
});
|
||||
// archive (zip)
|
||||
shortcuts.add('z', '', [Scope.MessageList, Scope.MessageView], () => {
|
||||
this.archiveCommand();
|
||||
return false;
|
||||
});
|
||||
|
||||
// delete
|
||||
shortcuts.add('delete', 'shift', Scope.MessageList, () => {
|
||||
MessageUserStore.listCheckedOrSelected().length && this.deleteWithoutMoveCommand();
|
||||
return false;
|
||||
});
|
||||
// shortcuts.add('3', 'shift', Scope.MessageList, () => {
|
||||
shortcuts.add('delete', '', Scope.MessageList, () => {
|
||||
MessageUserStore.listCheckedOrSelected().length && this.deleteCommand();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
// delete
|
||||
shortcuts.add('delete', 'shift', Scope.MessageList, () => {
|
||||
MessageUserStore.listCheckedOrSelected().length && this.deleteWithoutMoveCommand();
|
||||
return false;
|
||||
});
|
||||
// shortcuts.add('3', 'shift', Scope.MessageList, () => {
|
||||
shortcuts.add('delete', '', Scope.MessageList, () => {
|
||||
MessageUserStore.listCheckedOrSelected().length && this.deleteCommand();
|
||||
return false;
|
||||
});
|
||||
|
||||
if (Settings.capa(Capa.Reload)) {
|
||||
// check mail
|
||||
|
@ -793,13 +790,11 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
return false;
|
||||
});
|
||||
|
||||
if (Settings.capa(Capa.MessageListActions)) {
|
||||
// important - star/flag messages
|
||||
shortcuts.add('i', '', [Scope.MessageList, Scope.MessageView], () => {
|
||||
this.flagMessagesFast();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
// important - star/flag messages
|
||||
shortcuts.add('i', '', [Scope.MessageList, Scope.MessageView], () => {
|
||||
this.flagMessagesFast();
|
||||
return false;
|
||||
});
|
||||
|
||||
shortcuts.add('t', '', [Scope.MessageList], () => {
|
||||
let message = MessageUserStore.selectorMessageSelected();
|
||||
|
@ -814,32 +809,28 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
return false;
|
||||
});
|
||||
|
||||
if (Settings.capa(Capa.MessageListActions)) {
|
||||
// move
|
||||
shortcuts.add('insert', '', Scope.MessageList, () => {
|
||||
if (this.newMoveToFolder) {
|
||||
this.moveNewCommand();
|
||||
} else {
|
||||
this.moveDropdownTrigger(true);
|
||||
}
|
||||
// move
|
||||
shortcuts.add('insert', '', Scope.MessageList, () => {
|
||||
if (this.newMoveToFolder) {
|
||||
this.moveNewCommand();
|
||||
} else {
|
||||
this.moveDropdownTrigger(true);
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
if (Settings.capa(Capa.MessageListActions)) {
|
||||
// read
|
||||
shortcuts.add('q', '', [Scope.MessageList, Scope.MessageView], () => {
|
||||
this.seenMessagesFast(true);
|
||||
return false;
|
||||
});
|
||||
// read
|
||||
shortcuts.add('q', '', [Scope.MessageList, Scope.MessageView], () => {
|
||||
this.seenMessagesFast(true);
|
||||
return false;
|
||||
});
|
||||
|
||||
// unread
|
||||
shortcuts.add('u', '', [Scope.MessageList, Scope.MessageView], () => {
|
||||
this.seenMessagesFast(false);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
// unread
|
||||
shortcuts.add('u', '', [Scope.MessageList, Scope.MessageView], () => {
|
||||
this.seenMessagesFast(false);
|
||||
return false;
|
||||
});
|
||||
|
||||
shortcuts.add('f,mailforward', 'shift', [Scope.MessageList, Scope.MessageView], () => {
|
||||
this.multyForwardCommand();
|
||||
|
|
|
@ -54,7 +54,7 @@ class MessageViewMailBoxUserView extends AbstractViewRight {
|
|||
createCommandActionHelper = (folderType, useFolder) =>
|
||||
createCommand(() => {
|
||||
const message = MessageUserStore.message();
|
||||
if (message && this.allowMessageListActions) {
|
||||
if (message) {
|
||||
MessageUserStore.message(null);
|
||||
rl.app.deleteMessagesFromFolder(folderType, message.folder, [message.uid], useFolder);
|
||||
}
|
||||
|
@ -74,7 +74,6 @@ class MessageViewMailBoxUserView extends AbstractViewRight {
|
|||
this.moveAction = moveAction;
|
||||
|
||||
this.allowMessageActions = Settings.capa(Capa.MessageActions);
|
||||
this.allowMessageListActions = Settings.capa(Capa.MessageListActions);
|
||||
|
||||
const attachmentsActions = Settings.app('attachmentsActions');
|
||||
this.attachmentsActions = ko.observableArray(arrayLength(attachmentsActions) ? attachmentsActions : []);
|
||||
|
|
|
@ -1905,12 +1905,8 @@ class Actions
|
|||
|
||||
$aResult = array();
|
||||
|
||||
if ($oConfig->Get('capa', 'messagelist_actions', true)) {
|
||||
$aResult[] = Enumerations\Capa::MESSAGELIST_ACTIONS;
|
||||
|
||||
if ($oConfig->Get('capa', 'dangerous_actions', true)) {
|
||||
$aResult[] = Enumerations\Capa::DANGEROUS_ACTIONS;
|
||||
}
|
||||
if ($oConfig->Get('capa', 'dangerous_actions', true)) {
|
||||
$aResult[] = Enumerations\Capa::DANGEROUS_ACTIONS;
|
||||
}
|
||||
|
||||
if ($oConfig->Get('capa', 'reload', true)) {
|
||||
|
|
|
@ -195,7 +195,6 @@ class Application extends \RainLoop\Config\AbstractConfig
|
|||
'search_adv' => array(true),
|
||||
'dangerous_actions' => array(true),
|
||||
'message_actions' => array(true),
|
||||
'messagelist_actions' => array(true),
|
||||
'attachments_actions' => array(true)
|
||||
),
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ class Capa
|
|||
const HELP = 'HELP';
|
||||
const TEMPLATES = 'TEMPLATES';
|
||||
const MESSAGE_ACTIONS = 'MESSAGE_ACTIONS';
|
||||
const MESSAGELIST_ACTIONS = 'MESSAGELIST_ACTIONS';
|
||||
const ATTACHMENTS_ACTIONS = 'ATTACHMENTS_ACTIONS';
|
||||
const DANGEROUS_ACTIONS = 'DANGEROUS_ACTIONS';
|
||||
const AUTOLOGOUT = 'AUTOLOGOUT';
|
||||
|
|
Loading…
Reference in a new issue