mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-10 17:13:38 +08:00
No need to disable Composer (new message), so drop the feature
This commit is contained in:
parent
cec6c41953
commit
00088ef547
13 changed files with 16 additions and 50 deletions
|
@ -933,8 +933,7 @@ class AppUser extends AbstractApp {
|
|||
// When auto-login is active
|
||||
if (
|
||||
!!SettingsGet('AccountSignMe') &&
|
||||
navigator.registerProtocolHandler &&
|
||||
Settings.capa(Capa.Composer)
|
||||
navigator.registerProtocolHandler
|
||||
) {
|
||||
setTimeout(() => {
|
||||
try {
|
||||
|
@ -982,7 +981,7 @@ class AppUser extends AbstractApp {
|
|||
|
||||
showMessageComposer(params = [])
|
||||
{
|
||||
Settings.capa(Capa.Composer) && showScreenPopup(ComposePopupView, params);
|
||||
showScreenPopup(ComposePopupView, params);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
export const Capa = {
|
||||
OpenPGP: 'OPEN_PGP',
|
||||
Prefetch: 'PREFETCH',
|
||||
Composer: 'COMPOSER',
|
||||
Contacts: 'CONTACTS',
|
||||
Reload: 'RELOAD',
|
||||
Search: 'SEARCH',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { Capa, Scope } from 'Common/Enums';
|
||||
import { leftPanelDisabled, moveAction, Settings } from 'Common/Globals';
|
||||
import { Scope } from 'Common/Enums';
|
||||
import { leftPanelDisabled, moveAction } from 'Common/Globals';
|
||||
import { mailBox, settings } from 'Common/Links';
|
||||
import { setFolderHash } from 'Common/Cache';
|
||||
|
||||
|
@ -36,7 +36,6 @@ export class FolderListMailBoxUserView extends AbstractViewLeft {
|
|||
|
||||
this.leftPanelDisabled = leftPanelDisabled;
|
||||
|
||||
this.allowComposer = Settings.capa(Capa.Composer);
|
||||
this.allowContacts = AppUserStore.allowContacts();
|
||||
|
||||
this.folderListFocused = ko.computed(() => Scope.FolderList === AppUserStore.focusedState());
|
||||
|
|
|
@ -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.allowComposer = Settings.capa(Capa.Composer);
|
||||
this.allowMessageListActions = Settings.capa(Capa.MessageListActions);
|
||||
this.allowDangerousActions = Settings.capa(Capa.DangerousActions);
|
||||
|
||||
|
|
|
@ -73,7 +73,6 @@ class MessageViewMailBoxUserView extends AbstractViewRight {
|
|||
|
||||
this.moveAction = moveAction;
|
||||
|
||||
this.allowComposer = Settings.capa(Capa.Composer);
|
||||
this.allowMessageActions = Settings.capa(Capa.MessageActions);
|
||||
this.allowMessageListActions = Settings.capa(Capa.MessageListActions);
|
||||
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -186,7 +186,6 @@ class Application extends \RainLoop\Config\AbstractConfig
|
|||
),
|
||||
|
||||
'capa' => array(
|
||||
'composer' => array(true),
|
||||
'contacts' => array(true),
|
||||
'settings' => array(true),
|
||||
'quota' => array(true),
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue