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