Merge branch 'master' into addressbook

This commit is contained in:
djmaze 2022-07-22 11:16:32 +02:00
commit 513b2fcae8
12 changed files with 21 additions and 38 deletions

View file

@ -233,8 +233,8 @@ export class FilterModel extends AbstractModel {
return filter;
}
cloneSelf() {
const filter = new FilterModel();
assignTo(target) {
const filter = target || new FilterModel();
filter.id = this.id;

View file

@ -102,24 +102,15 @@ export class SieveScriptPopupView extends rl.pluginPopupView {
filter.generateID();
FilterPopupView.showModal([
filter,
() => this.filters.push(filter)
() => this.filters.push(filter.assignTo())
]);
}
editFilter(filter) {
const clonedFilter = filter.cloneSelf();
const clonedFilter = filter.assignTo();
FilterPopupView.showModal([
clonedFilter,
() => {
const script = this.script(),
filters = script.filters(),
index = filters.indexOf(filter);
if (-1 < index) {
// script.filters.splice(index, 1, clonedFilter);
filters[index] = clonedFilter;
script.filters(filters);
}
},
() => clonedFilter.assignTo(filter),
true
]);
}

View file

@ -1231,7 +1231,7 @@ class Actions
$oAccount = $this->getAccountFromToken();
try {
$oAccount->IncConnectAndLoginHelper($this->oPlugins, $this->MailClient(), $this->oConfig);
$oAccount->ImapConnectAndLoginHelper($this->oPlugins, $this->MailClient(), $this->oConfig);
} catch (\MailSo\Net\Exceptions\ConnectionException $oException) {
throw new Exceptions\ClientException(Notifications::ConnectionError, $oException);
} catch (\Throwable $oException) {

View file

@ -790,7 +790,7 @@ trait Messages
$oSmtpClient->SetTimeOuts(10, (int) \RainLoop\Api::Config()->Get('labs', 'smtp_timeout', 60));
$bUsePhpMail = false;
$oAccount->OutConnectAndLoginHelper($this->Plugins(), $oSmtpClient, $this->Config(), $bUsePhpMail);
$oAccount->SmtpConnectAndLoginHelper($this->Plugins(), $oSmtpClient, $this->Config(), $bUsePhpMail);
if ($bUsePhpMail)
{

View file

@ -434,7 +434,7 @@ trait UserAuth
protected function CheckMailConnection(Account $oAccount, bool $bAuthLog = false): void
{
try {
$oAccount->IncConnectAndLoginHelper($this->Plugins(), $this->MailClient(), $this->Config());
$oAccount->ImapConnectAndLoginHelper($this->Plugins(), $this->MailClient(), $this->Config());
} catch (ClientException $oException) {
throw $oException;
} catch (\MailSo\Net\Exceptions\ConnectionException $oException) {

View file

@ -195,7 +195,7 @@ abstract class Account implements \JsonSerializable
return null;
}
public function IncConnectAndLoginHelper(\RainLoop\Plugins\Manager $oPlugins, \MailSo\Mail\MailClient $oMailClient, \RainLoop\Config\Application $oConfig) : bool
public function ImapConnectAndLoginHelper(\RainLoop\Plugins\Manager $oPlugins, \MailSo\Mail\MailClient $oMailClient, \RainLoop\Config\Application $oConfig) : bool
{
$oImapClient = $oMailClient->ImapClient();
$oImapClient->__FORCE_SELECT_ON_EXAMINE__ = !!$oConfig->Get('labs', 'use_imap_force_selection');
@ -230,7 +230,7 @@ abstract class Account implements \JsonSerializable
return $this->netClientLogin($oImapClient, $oConfig, $oPlugins, $aCredentials);
}
public function OutConnectAndLoginHelper(\RainLoop\Plugins\Manager $oPlugins, \MailSo\Smtp\SmtpClient $oSmtpClient, \RainLoop\Config\Application $oConfig, bool &$bUsePhpMail = false) : bool
public function SmtpConnectAndLoginHelper(\RainLoop\Plugins\Manager $oPlugins, \MailSo\Smtp\SmtpClient $oSmtpClient, \RainLoop\Config\Application $oConfig, bool &$bUsePhpMail = false) : bool
{
$aCredentials = \array_merge(
$this->Domain()->SmtpSettings(),

View file

@ -8,11 +8,9 @@
<div class="row" data-bind="visible: dataFolderAccess">
<div class="alert alert-error span8" style="margin-top: 10px;">
<h4 data-i18n="TAB_GENERAL/ALERT_WARNING"></h4>
<br>
<span data-i18n="TAB_GENERAL/ALERT_DATA_ACCESS"></span>
&nbsp;
<a href="https://www.rainloop.net/docs/installation/#notice"
target="_blank"><strong>https://www.rainloop.net/docs/installation</strong></a>
<div data-i18n="TAB_GENERAL/ALERT_DATA_ACCESS"></div>
<a href="https://github.com/the-djmaze/snappymail/wiki/Installation-instructions#secure-data-folder"
target="_blank"><strong>https://github.com/the-djmaze/snappymail/wiki/Installation-instructions</strong></a>
</div>
</div>
<div class="form-horizontal">
@ -97,7 +95,7 @@
<br>
<br>
<div class="alert alert-info">
<b>PHP:</b>&nbsp;<!-- ko text: uploadDataDesc --><!-- /ko -->
<b>PHP: </b><!-- ko text: uploadDataDesc --><!-- /ko -->
</div>
</div>
</div>

View file

@ -22,7 +22,7 @@
<div data-bind="visible: packagesUpdate().length">
<div class="legend">
<span data-i18n="TAB_PACKAGES/LEGEND_AVAILABLE_FOR_UPDATE"></span>&nbsp;
<span data-i18n="TAB_PACKAGES/LEGEND_AVAILABLE_FOR_UPDATE"></span>
(<span data-bind="text: packagesUpdate().length"></span>)
</div>
<div data-bind="template: { name: 'AdminSettingsPackagesTable', data: {f: packagesUpdate} }"></div>

View file

@ -65,8 +65,7 @@
inline: true
}
}"></div>
&nbsp;&nbsp;
<span style="color:red">(<span data-i18n="HINTS/UNSTABLE"></span>)</span>
<span style="color:red"> (<span data-i18n="HINTS/UNSTABLE"></span>)</span>
<br>
<div data-bind="component: {
name: 'Checkbox',

View file

@ -6,8 +6,7 @@
<div class="row" data-bind="visible: !edit()" style="margin-bottom: 20px;">
<div class="span5">
<span data-i18n="POPUPS_DOMAIN/LABEL_NAME"></span>
&nbsp;
<span style="color: #aaa">(<span data-i18n="POPUPS_DOMAIN/NAME_HELPER"></span>)</span>
<span style="opacity:0.7"> (<span data-i18n="POPUPS_DOMAIN/NAME_HELPER"></span>)</span>
<br>
<input type="text" class="span4" autofocus="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
data-bind="textInput: name">
@ -56,8 +55,7 @@
inline: true
}
}"></div>
&nbsp;&nbsp;
<span style="color: #aaa">(user@domain.com → user)</span>
<span style="opacity:0.7"> (user@domain.com → user)</span>
</div>
<input type="radio" name="helptabs" id="tab-help2">
@ -98,8 +96,7 @@
inline: true
}
}"></div>
&nbsp;&nbsp;
<span style="color: #aaa">(user@domain.com → user)</span>
<span style="opacity:0.7"> (user@domain.com → user)</span>
<div data-bind="component: {
name: 'Checkbox',
params: {
@ -126,8 +123,7 @@
inline: true
}
}"></div>
&nbsp;&nbsp;
<span style="color:red">(<span data-i18n="HINTS/BETA"></span>)</span>
<span style="color:red"> (<span data-i18n="HINTS/BETA"></span>)</span>
</div>
<input type="radio" name="helptabs" id="tab-help3">

View file

@ -2,7 +2,6 @@
<a href="#" class="close" data-bind="click: close">×</a>
<h4>
<span data-i18n="POPUPS_PLUGIN/TITLE_PLUGIN"></span>
&nbsp;
"<span data-bind="text: name"></span>"
</h4>
<span data-bind="visible: hasReadme, text: readme"></span>

View file

@ -22,7 +22,7 @@
data-i18n="POPUPS_FILTER/SELECT_MATCH_ALL"></option>
</select>
</div>
<div data-bind="visible: conditions().length, foreach: conditions">
<div data-bind="foreach: conditions">
<div class="control-group" data-bind="css: {'error': valueError}" style="display:flex">
<div style="flex-grow:1" data-bind="css: {'error': valueError}, template: {'name': template(), 'data': $data}"></div>
<span class="delete-action button-delete fontastic" style="margin-top: 5px;"