diff --git a/dev/Common/Enums.js b/dev/Common/Enums.js index 3a0606d3f..3c3b43f06 100644 --- a/dev/Common/Enums.js +++ b/dev/Common/Enums.js @@ -18,7 +18,6 @@ export const Capa = { TwoFactorForce: 'TWO_FACTOR_FORCE', OpenPGP: 'OPEN_PGP', Prefetch: 'PREFETCH', - Folders: 'FOLDERS', Composer: 'COMPOSER', Contacts: 'CONTACTS', Reload: 'RELOAD', diff --git a/dev/Common/Globals.js b/dev/Common/Globals.js index ce356eec3..936a052da 100644 --- a/dev/Common/Globals.js +++ b/dev/Common/Globals.js @@ -13,7 +13,6 @@ export const dropdownVisibility = ko.observable(false).extend({ rateLimit: 0 }); export const moveAction = ko.observable(false); export const leftPanelDisabled = ko.observable(false); -export const leftPanelType = ko.observable(''); export const createElement = (name, attr) => { let el = doc.createElement(name); @@ -26,11 +25,6 @@ leftPanelDisabled.subscribe(value => { $htmlCL.toggle('rl-left-panel-disabled', value); }); -leftPanelType.subscribe(sValue => { - $htmlCL.toggle('rl-left-panel-none', 'none' === sValue); - $htmlCL.toggle('rl-left-panel-short', 'short' === sValue); -}); - moveAction.subscribe(value => value && leftPanelDisabled() && leftPanelDisabled(false)); // keys diff --git a/dev/Screen/User/MailBox.js b/dev/Screen/User/MailBox.js index 0dc4e5948..a5f1827f0 100644 --- a/dev/Screen/User/MailBox.js +++ b/dev/Screen/User/MailBox.js @@ -1,6 +1,5 @@ -import { Capa } from 'Common/Enums'; import { Focused } from 'Common/EnumsUser'; -import { doc, leftPanelDisabled, leftPanelType, moveAction, Settings } from 'Common/Globals'; +import { doc, leftPanelDisabled, moveAction, Settings } from 'Common/Globals'; import { pString, pInt } from 'Common/Utils'; import { getFolderFromCacheList, getFolderFullNameRaw, getFolderInboxName } from 'Common/Cache'; import { i18n } from 'Common/Translator'; @@ -58,12 +57,6 @@ export class MailBoxUserScreen extends AbstractScreen { AppStore.focusedState(Focused.MessageList); ThemeStore.isMobile() && leftPanelDisabled(true); - - if (Settings.capa(Capa.Folders)) { - leftPanelType(''); - } else { - leftPanelType(Settings.capa(Capa.Composer) || Settings.capa(Capa.Contacts) ? 'short' : 'none'); - } } /** diff --git a/dev/Screen/User/Settings.js b/dev/Screen/User/Settings.js index 75bf6c026..52b0e6531 100644 --- a/dev/Screen/User/Settings.js +++ b/dev/Screen/User/Settings.js @@ -1,5 +1,5 @@ import { Capa, KeyState } from 'Common/Enums'; -import { keyScope, leftPanelType, leftPanelDisabled, Settings } from 'Common/Globals'; +import { keyScope, leftPanelDisabled, Settings } from 'Common/Globals'; import { runSettingsViewModelHooks } from 'Common/Plugins'; import { initOnStartOrLangChange, i18n } from 'Common/Translator'; @@ -77,9 +77,7 @@ export class SettingsUserScreen extends AbstractSettingsScreen { ); } - if (Settings.capa(Capa.Folders)) { - settingsAddViewModel(FoldersUserSettings, 'SettingsFolders', 'SETTINGS_LABELS/LABEL_FOLDERS_NAME', 'folders'); - } + settingsAddViewModel(FoldersUserSettings, 'SettingsFolders', 'SETTINGS_LABELS/LABEL_FOLDERS_NAME', 'folders'); if (Settings.capa(Capa.Themes)) { settingsAddViewModel(ThemesUserSettings, 'SettingsThemes', 'SETTINGS_LABELS/LABEL_THEMES_NAME', 'themes'); @@ -99,8 +97,6 @@ export class SettingsUserScreen extends AbstractSettingsScreen { onShow() { this.setSettingsTitle(); keyScope(KeyState.Settings); - leftPanelType(''); - ThemeStore.isMobile() && leftPanelDisabled(true); } diff --git a/dev/Styles/FolderList.less b/dev/Styles/FolderList.less index 325928b52..3f7a62fc5 100644 --- a/dev/Styles/FolderList.less +++ b/dev/Styles/FolderList.less @@ -258,7 +258,7 @@ } } -html.rl-left-panel-disabled, html.rl-left-panel-short { +html.rl-left-panel-disabled { .buttonComposeText{ display: none; } diff --git a/dev/Styles/Layout.less b/dev/Styles/Layout.less index 01a4bb684..de9302a3a 100644 --- a/dev/Styles/Layout.less +++ b/dev/Styles/Layout.less @@ -223,11 +223,6 @@ html:not(.rl-left-panel-disabled) #rl-left.resizable > .resizer, } } -.hidden-on-ctrl-btn, -.visible-on-ctrl-btn { - display: inline-block; -} - html:not(.rl-ctrl-key-pressed) .visible-on-ctrl-btn, html.rl-ctrl-key-pressed .hidden-on-ctrl-btn, .show-on-panel-disabled { @@ -257,16 +252,6 @@ html.rl-left-panel-disabled { } } -html.rl-left-panel-short #rl-left, -html.rl-left-panel-short #rl-right { - width: 60px !important; -} - -html.rl-left-panel-none #rl-left, -html.rl-left-panel-none #rl-right { - width: 10px !important; -} - html.rl-mobile, html.rl-no-preview-pane { diff --git a/dev/View/Popup/Compose.js b/dev/View/Popup/Compose.js index f8e77efe3..ff0579e07 100644 --- a/dev/View/Popup/Compose.js +++ b/dev/View/Popup/Compose.js @@ -1,7 +1,6 @@ import ko from 'ko'; import { - Capa, KeyState, StorageResultType, Notification, @@ -128,7 +127,6 @@ class ComposePopupView extends AbstractViewPopup { this.sLastFocusedField = 'to'; this.allowContacts = !!AppStore.contactsIsAllowed(); - this.allowFolders = !!Settings.capa(Capa.Folders); this.bSkipNextHide = false; this.composeInEdit = AppStore.composeInEdit; @@ -398,10 +396,6 @@ class ComposePopupView extends AbstractViewPopup { } } - if (!this.allowFolders) { - sSentFolder = UNUSED_OPTION_VALUE; - } - if (!sSentFolder) { showScreenPopup(FolderSystemPopupView, [SetSystemFoldersNotification.Sent]); } else { @@ -437,10 +431,6 @@ class ComposePopupView extends AbstractViewPopup { } saveCommand() { - if (!this.allowFolders) { - return false; - } - if (FolderStore.draftFolderNotEnabled()) { showScreenPopup(FolderSystemPopupView, [SetSystemFoldersNotification.Draft]); } else { @@ -1146,16 +1136,14 @@ class ComposePopupView extends AbstractViewPopup { return false; }); - if (this.allowFolders) { - shortcuts.add('s', 'meta', KeyState.Compose, () => { - this.saveCommand(); - return false; - }); - shortcuts.add('save', KeyState.Compose, () => { - this.saveCommand(); - return false; - }); - } + shortcuts.add('s', 'meta', KeyState.Compose, () => { + this.saveCommand(); + return false; + }); + shortcuts.add('save', KeyState.Compose, () => { + this.saveCommand(); + return false; + }); if (Settings.app('allowCtrlEnterOnCompose')) { shortcuts.add('enter', 'meta', KeyState.Compose, () => { diff --git a/dev/View/User/MailBox/FolderList.js b/dev/View/User/MailBox/FolderList.js index 1838d528f..cef159903 100644 --- a/dev/View/User/MailBox/FolderList.js +++ b/dev/View/User/MailBox/FolderList.js @@ -40,7 +40,6 @@ export class FolderListMailBoxUserView extends AbstractViewLeft { this.allowComposer = !!Settings.capa(Capa.Composer); this.allowContacts = !!AppStore.contactsIsAllowed(); - this.allowFolders = !!Settings.capa(Capa.Folders); this.folderListFocused = ko.computed(() => Focused.FolderList === AppStore.focusedState()); diff --git a/dev/View/User/MailBox/MessageList.js b/dev/View/User/MailBox/MessageList.js index 68fb49f49..3ad98b009 100644 --- a/dev/View/User/MailBox/MessageList.js +++ b/dev/View/User/MailBox/MessageList.js @@ -69,7 +69,6 @@ export class MessageListMailBoxUserView extends AbstractViewRight { this.allowComposer = !!Settings.capa(Capa.Composer); this.allowMessageListActions = !!Settings.capa(Capa.MessageListActions); this.allowDangerousActions = !!Settings.capa(Capa.DangerousActions); - this.allowFolders = !!Settings.capa(Capa.Folders); this.popupVisibility = popupVisibility; diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php index 2fa65c6fb..54323ab86 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -1220,8 +1220,6 @@ class Actions $oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount); if ($oSettingsLocal instanceof Settings) { -// if ($this->GetCapa(false, Enumerations\Capa::FOLDERS, $oAccount)) - $aResult['SentFolder'] = (string)$oSettingsLocal->GetConf('SentFolder', ''); $aResult['DraftFolder'] = (string)$oSettingsLocal->GetConf('DraftFolder', ''); $aResult['SpamFolder'] = (string)$oSettingsLocal->GetConf('SpamFolder', ''); @@ -2036,15 +2034,11 @@ class Actions $aResult = array(); - if ($oConfig->Get('capa', 'folders', true)) { - $aResult[] = Enumerations\Capa::FOLDERS; + if ($oConfig->Get('capa', 'messagelist_actions', true)) { + $aResult[] = Enumerations\Capa::MESSAGELIST_ACTIONS; - 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; } } diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Folders.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Folders.php index 65194f1f2..f42e9ca04 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Folders.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Folders.php @@ -17,12 +17,10 @@ trait Folders $oFolderCollection = null; $this->Plugins()->RunHook('filter.folders-before', array($oAccount, $oFolderCollection)); - $bUseFolders = $this->GetCapa(false, Capa::FOLDERS, $oAccount); - if (null === $oFolderCollection) { $oFolderCollection = $this->MailClient()->Folders('', - $bUseFolders ? '*' : 'INBOX', + '*', !!$this->Config()->Get('labs', 'use_imap_list_subscribe', true), (int) $this->Config()->Get('labs', 'imap_folder_list_limit', 200) ); @@ -38,7 +36,7 @@ trait Folders $this->recFoldersTypes($oAccount, $oFolderCollection, $aSystemFolders); $oFolderCollection->SystemFolders = $aSystemFolders; - if ($bUseFolders && $this->Config()->Get('labs', 'autocreate_system_folders', true)) + if ($this->Config()->Get('labs', 'autocreate_system_folders', true)) { $bDoItAgain = false; @@ -157,11 +155,6 @@ trait Folders { $oAccount = $this->initMailClientConnection(); - if (!$this->GetCapa(false, Capa::FOLDERS, $oAccount)) - { - return $this->FalseResponse(__FUNCTION__); - } - try { $sFolderNameInUtf = $this->GetActionParam('Folder', ''); @@ -182,11 +175,6 @@ trait Folders { $oAccount = $this->initMailClientConnection(); - if (!$this->GetCapa(false, Capa::FOLDERS, $oAccount)) - { - return $this->FalseResponse(__FUNCTION__); - } - $sFolderFullNameRaw = $this->GetActionParam('Folder', ''); $bSubscribe = '1' === (string) $this->GetActionParam('Subscribe', '0'); @@ -213,11 +201,6 @@ trait Folders { $oAccount = $this->getAccountFromToken(); - if (!$this->GetCapa(false, Capa::FOLDERS, $oAccount)) - { - return $this->FalseResponse(__FUNCTION__); - } - $sFolderFullNameRaw = $this->GetActionParam('Folder', ''); $bCheckable = '1' === (string) $this->GetActionParam('Checkable', '0'); @@ -263,11 +246,6 @@ trait Folders { $oAccount = $this->initMailClientConnection(); - if (!$this->GetCapa(false, Capa::FOLDERS, $oAccount)) - { - return $this->FalseResponse(__FUNCTION__); - } - $sPrevFolderFullNameRaw = $this->GetActionParam('Folder', ''); $sNewTopFolderNameInUtf = $this->GetActionParam('NewFolderName', ''); @@ -291,11 +269,6 @@ trait Folders { $oAccount = $this->initMailClientConnection(); - if (!$this->GetCapa(false, Capa::FOLDERS, $oAccount)) - { - return $this->FalseResponse(__FUNCTION__); - } - $sFolderFullNameRaw = $this->GetActionParam('Folder', ''); try diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php index 61e4932a6..12009c876 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php @@ -178,7 +178,6 @@ class Application extends \RainLoop\Config\AbstractConfig ), 'capa' => array( - 'folders' => array(true), 'composer' => array(true), 'contacts' => array(true), 'settings' => array(true), diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php index 649f29885..5c7fc91c8 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php @@ -16,7 +16,6 @@ class Capa const ATTACHMENT_THUMBNAILS = 'ATTACHMENT_THUMBNAILS'; const ADDITIONAL_ACCOUNTS = 'ADDITIONAL_ACCOUNTS'; const IDENTITIES = 'IDENTITIES'; - const FOLDERS = 'FOLDERS'; const COMPOSER = 'COMPOSER'; const CONTACTS = 'CONTACTS'; const RELOAD = 'RELOAD'; diff --git a/snappymail/v/0.0.0/app/templates/Views/User/MailFolderList.html b/snappymail/v/0.0.0/app/templates/Views/User/MailFolderList.html index 020627c61..8de19ff06 100644 --- a/snappymail/v/0.0.0/app/templates/Views/User/MailFolderList.html +++ b/snappymail/v/0.0.0/app/templates/Views/User/MailFolderList.html @@ -6,7 +6,7 @@ 📇 -