No need to disable Composer (new message), so drop the feature

This commit is contained in:
djmaze 2021-09-17 13:58:49 +02:00
parent cec6c41953
commit 00088ef547
13 changed files with 16 additions and 50 deletions

View file

@ -1961,12 +1961,8 @@ class Actions
$aResult[] = Enumerations\Capa::MESSAGE_ACTIONS;
}
if ($oConfig->Get('capa', 'composer', true)) {
$aResult[] = Enumerations\Capa::COMPOSER;
if ($oConfig->Get('capa', 'contacts', true)) {
$aResult[] = Enumerations\Capa::CONTACTS;
}
if ($oConfig->Get('capa', 'contacts', true)) {
$aResult[] = Enumerations\Capa::CONTACTS;
}
if ($oConfig->Get('capa', 'search', true)) {

View file

@ -104,11 +104,6 @@ trait Messages
{
$oAccount = $this->initMailClientConnection();
if (!$this->GetCapa(false, Capa::COMPOSER, $oAccount))
{
return $this->FalseResponse(__FUNCTION__);
}
$sMessageFolder = $this->GetActionParam('MessageFolder', '');
$iMessageUid = $this->GetActionParam('MessageUid', 0);
@ -171,11 +166,6 @@ trait Messages
{
$oAccount = $this->initMailClientConnection();
if (!$this->GetCapa(false, Capa::COMPOSER, $oAccount))
{
return $this->FalseResponse(__FUNCTION__);
}
$oConfig = $this->Config();
$sDraftFolder = $this->GetActionParam('MessageFolder', '');
@ -354,11 +344,6 @@ trait Messages
{
$oAccount = $this->initMailClientConnection();
if (!$this->GetCapa(false, Capa::COMPOSER, $oAccount))
{
return $this->FalseResponse(__FUNCTION__);
}
$oMessage = $this->buildReadReceiptMessage($oAccount);
$this->Plugins()->RunHook('filter.send-read-receipt-message', array($oMessage, $oAccount));

View file

@ -250,11 +250,6 @@ trait Response
$mResult['IsForwarded'] = \strlen($sForwardedFlag) && \in_array(\strtolower($sForwardedFlag), $aFlags);
$mResult['IsReadReceipt'] = \strlen($sReadReceiptFlag) && \in_array(\strtolower($sReadReceiptFlag), $aFlags);
if (!$this->GetCapa(false, Capa::COMPOSER, $oAccount))
{
$mResult['IsReadReceipt'] = true;
}
if ('Message' === $sParent)
{
$oAttachments = /* @var \MailSo\Mail\AttachmentCollection */ $mResponse->Attachments();

View file

@ -186,7 +186,6 @@ class Application extends \RainLoop\Config\AbstractConfig
),
'capa' => array(
'composer' => array(true),
'contacts' => array(true),
'settings' => array(true),
'quota' => array(true),

View file

@ -12,7 +12,6 @@ class Capa
const ATTACHMENT_THUMBNAILS = 'ATTACHMENT_THUMBNAILS';
const ADDITIONAL_ACCOUNTS = 'ADDITIONAL_ACCOUNTS';
const IDENTITIES = 'IDENTITIES';
const COMPOSER = 'COMPOSER';
const CONTACTS = 'CONTACTS';
const RELOAD = 'RELOAD';
const SEARCH = 'SEARCH';

View file

@ -1,6 +1,6 @@
<div class="b-folders g-ui-user-select-none" data-bind="css: {'focused': folderListFocused, 'single-root-inbox': foldersListWithSingleInboxRootFolder}">
<div class="b-toolbar btn-toolbar hide-mobile">
<a class="btn buttonCompose" data-bind="visible: allowComposer, click: composeClick, css: {'btn-warning': composeInEdit, 'btn-success': !composeInEdit()}" data-i18n="[title]FOLDER_LIST/BUTTON_NEW_MESSAGE">
<a class="btn buttonCompose" data-bind="click: composeClick, css: {'btn-warning': composeInEdit, 'btn-success': !composeInEdit()}" data-i18n="[title]FOLDER_LIST/BUTTON_NEW_MESSAGE">
<i class="icon-paper-plane"></i>
<span class="buttonComposeText" data-i18n="FOLDER_LIST/BUTTON_NEW_MESSAGE"></span>
</a>

View file

@ -4,7 +4,7 @@
<div class="btn-toolbar">
<a class="btn btn-thin-2 fontastic show-mobile" data-bind="click: hideLeft, visible: !leftPanelDisabled()"></a>
<a class="btn btn-thin-2 fontastic show-mobile" data-bind="click: showLeft, visible: leftPanelDisabled()"></a>
<a class="btn buttonCompose show-mobile" data-bind="click: composeClick, css: {'btn-warning': composeInEdit, 'btn-success': !composeInEdit()}, visible: allowComposer && mobileCheckedStateHide()" data-i18n="[title]FOLDER_LIST/BUTTON_NEW_MESSAGE">
<a class="btn buttonCompose show-mobile" data-bind="click: composeClick, css: {'btn-warning': composeInEdit, 'btn-success': !composeInEdit()}, visible: mobileCheckedStateHide()" data-i18n="[title]FOLDER_LIST/BUTTON_NEW_MESSAGE">
<i class="icon-paper-plane"></i>
</a>
<a class="btn" data-bind="command: reloadCommand, visible: allowReload && mobileCheckedStateHide()" data-i18n="[title]MESSAGE_LIST/BUTTON_RELOAD">
@ -45,7 +45,7 @@
<a class="btn button-delete fontastic"
data-bind="command: deleteCommand" data-i18n="[title]GLOBAL/DELETE">🗑</a>
</div>
<div class="btn-group dropdown colored-toggle" data-bind="visible: allowComposer || allowMessageListActions || allowDangerousActions, registerBootstrapDropdown: true, openDropdownTrigger: moreDropdownTrigger">
<div class="btn-group dropdown colored-toggle" data-bind="registerBootstrapDropdown: true, openDropdownTrigger: moreDropdownTrigger">
<a id="more-list-dropdown-id" class="btn dropdown-toggle fontastic" href="#" tabindex="-1" data-i18n="[title]GLOBAL/MORE"></a>
<ul class="dropdown-menu g-ui-menu" role="menu" aria-labelledby="more-list-dropdown-id">
<div data-bind="visible: allowMessageListActions">
@ -80,7 +80,7 @@
</a>
</li>
</div>
<li class="e-item dividerbar" role="presentation" data-bind="visible: allowComposer, command: multyForwardCommand">
<li class="e-item dividerbar" role="presentation" data-bind="command: multyForwardCommand">
<a class="e-link menuitem" href="#" tabindex="-1">
<i class="fontastic"></i>
<span data-i18n="MESSAGE_LIST/BUTTON_MULTY_FORWARD"></span>

View file

@ -46,18 +46,15 @@
<div class="message-fixed-button-toolbar" data-bind="visible: message">
<div class="btn-group" style="margin-right: -11px;">
<a class="btn btn-thin-2 btn-transparent buttonReply fontastic"
data-bind="visible: 'reply' === lastReplyAction() && allowComposer, command: replyCommand" data-i18n="[title]MESSAGE/BUTTON_REPLY">←</a>
data-bind="visible: 'reply' === lastReplyAction(), command: replyCommand" data-i18n="[title]MESSAGE/BUTTON_REPLY">←</a>
<a class="btn btn-thin-2 btn-transparent buttonReplyAll fontastic"
data-bind="visible: 'replyall' === lastReplyAction() && allowComposer, command: replyAllCommand" data-i18n="[title]MESSAGE/BUTTON_REPLY_ALL">↞</a>
data-bind="visible: 'replyall' === lastReplyAction(), command: replyAllCommand" data-i18n="[title]MESSAGE/BUTTON_REPLY_ALL">↞</a>
<a class="btn btn-thin-2 btn-transparent buttonForward fontastic"
data-bind="visible: 'forward' === lastReplyAction() && allowComposer, command: forwardCommand" data-i18n="[title]MESSAGE/BUTTON_FORWARD">→</a>
<div class="btn-group" data-bind="registerBootstrapDropdown: true, visible: allowComposer || allowMessageListActions || allowMessageActions" style="display: inline-block">
<a class="btn btn-thin-2 btn-transparent dropdown-toggle" id="more-view-dropdown-id" href="#" tabindex="-1" style="margin-left: -4px; margin-right: 2px">
<span data-bind="visible: allowComposer"></span>
<span data-bind="visible: !allowComposer" class="fontastic"></span>
</a>
data-bind="visible: 'forward' === lastReplyAction(), command: forwardCommand" data-i18n="[title]MESSAGE/BUTTON_FORWARD">→</a>
<div class="btn-group" data-bind="registerBootstrapDropdown: true" style="display: inline-block">
<a class="btn btn-thin-2 btn-transparent dropdown-toggle" id="more-view-dropdown-id" href="#" tabindex="-1" style="margin-left: -4px; margin-right: 2px"></a>
<ul class="dropdown-menu g-ui-menu right-edge" role="menu" aria-labelledby="more-view-dropdown-id">
<div data-bind="visible: allowComposer && !isDraftFolder()">
<div data-bind="visible: !isDraftFolder()">
<li class="e-item" role="presentation">
<a class="e-link menuitem" href="#" tabindex="-1" data-bind="command: replyCommand">
<i class="fontastic"></i>