From 5f4c7c5c5b8de3ea2be1d87eaeee84ec1142dca9 Mon Sep 17 00:00:00 2001 From: djmaze Date: Mon, 15 Nov 2021 14:55:49 +0100 Subject: [PATCH] Bugfix: compose/send mail AdditionalAccount failed --- dev/Styles/User/Compose.less | 8 +++++-- .../0.0.0/app/libraries/RainLoop/Actions.php | 13 ------------ .../libraries/RainLoop/Actions/Accounts.php | 21 ++++++++++++++----- .../templates/Views/User/PopupsCompose.html | 21 +++++++++++-------- vendors/bootstrap/less/dropdowns.less | 2 +- 5 files changed, 35 insertions(+), 30 deletions(-) diff --git a/dev/Styles/User/Compose.less b/dev/Styles/User/Compose.less index 7e3579f0b..229881272 100644 --- a/dev/Styles/User/Compose.less +++ b/dev/Styles/User/Compose.less @@ -97,15 +97,19 @@ } .e-identity { - color: var(--main-color); - text-decoration: none; font-weight: bold; + line-height: @baseLineHeight; + padding: 4px 0; + text-decoration: none; &.multiply { cursor: pointer; border-bottom: 1px dashed var(--main-color); } + &.multiply::after { + content: '▼'; + } } > div { 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 1e6e70438..d2a0d15ef 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -1111,19 +1111,6 @@ class Actions ); } - public function GetIdentityByID(Model\Account $oAccount, string $sID, bool $bFirstOnEmpty = false): ?Model\Identity - { - $aIdentities = $this->GetIdentities($oAccount); - - foreach ($aIdentities as $oIdentity) { - if ($oIdentity && $sID === $oIdentity->Id()) { - return $oIdentity; - } - } - - return $bFirstOnEmpty && isset($aIdentities[0]) ? $aIdentities[0] : null; - } - public function setConfigFromParams(Config\Application $oConfig, string $sParamName, string $sConfigSector, string $sConfigName, string $sType = 'string', ?callable $mStringCallback = null): void { $sValue = $this->GetActionParam($sParamName, ''); diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Accounts.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Accounts.php index da393f06b..1a588400e 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Accounts.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Accounts.php @@ -224,21 +224,19 @@ trait Accounts */ public function DoAccountsAndIdentities(): array { - $oAccount = $this->getMainAccountFromToken(); - return $this->DefaultResponse(__FUNCTION__, array( 'Accounts' => \array_map( 'MailSo\\Base\\Utils::IdnToUtf8', - \array_keys($this->GetAccounts($oAccount)) + \array_keys($this->GetAccounts($this->getMainAccountFromToken())) ), - 'Identities' => $this->GetIdentities($oAccount) + 'Identities' => $this->GetIdentities($this->getAccountFromToken()) )); } /** * @return Identity[] */ - public function GetIdentities(MainAccount $oAccount): array + public function GetIdentities(Account $oAccount): array { // A custom name for a single identity is also stored in this system $allowMultipleIdentities = $this->GetCapa(false, Capa::IDENTITIES, $oAccount); @@ -281,4 +279,17 @@ trait Accounts return $identities; } + public function GetIdentityByID(Account $oAccount, string $sID, bool $bFirstOnEmpty = false): ?Identity + { + $aIdentities = $this->GetIdentities($oAccount); + + foreach ($aIdentities as $oIdentity) { + if ($oIdentity && $sID === $oIdentity->Id()) { + return $oIdentity; + } + } + + return $bFirstOnEmpty && isset($aIdentities[0]) ? $aIdentities[0] : null; + } + } diff --git a/snappymail/v/0.0.0/app/templates/Views/User/PopupsCompose.html b/snappymail/v/0.0.0/app/templates/Views/User/PopupsCompose.html index 305264fda..67c920ee7 100644 --- a/snappymail/v/0.0.0/app/templates/Views/User/PopupsCompose.html +++ b/snappymail/v/0.0.0/app/templates/Views/User/PopupsCompose.html @@ -22,19 +22,22 @@ + + + + +
diff --git a/vendors/bootstrap/less/dropdowns.less b/vendors/bootstrap/less/dropdowns.less index 2e5bfd99a..5bba82d2b 100644 --- a/vendors/bootstrap/less/dropdowns.less +++ b/vendors/bootstrap/less/dropdowns.less @@ -55,7 +55,7 @@ // Links within the dropdown menu a { background-color: var(--dropdown-menu-bg-color, #fff); - color: var(--main-color, @dropdownLinkColor); + color: var(--dropdown-menu-color, @dropdownLinkColor); display: block; padding: 3px 10px; text-decoration: none;