mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Resolve #1404
This commit is contained in:
parent
355f6158be
commit
8ab32816e2
6 changed files with 50 additions and 25 deletions
|
|
@ -17,6 +17,7 @@ export class IdentityModel extends AbstractModel {
|
|||
|
||||
replyTo: '',
|
||||
bcc: '',
|
||||
sentFolder: '',
|
||||
|
||||
signature: '',
|
||||
signatureInsertBefore: false,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
max-width: 770px;
|
||||
|
||||
.tab-content {
|
||||
grid-column-end: 4;
|
||||
grid-column-end: 5;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -457,7 +457,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
}
|
||||
|
||||
sendCommand() {
|
||||
let sSentFolder = FolderUserStore.sentFolder();
|
||||
let sSentFolder = this.currentIdentity()?.sentFolder || FolderUserStore.sentFolder();
|
||||
|
||||
this.attachmentsInProcessError(false);
|
||||
this.attachmentsInErrorError(false);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
import { addObservablesTo } from 'External/ko';
|
||||
import { addObservablesTo, koComputable } from 'External/ko';
|
||||
|
||||
import { getNotification } from 'Common/Translator';
|
||||
import { loadAccountsAndIdentities } from 'Common/UtilsUser';
|
||||
|
|
@ -10,6 +10,10 @@ import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
|||
|
||||
import { IdentityModel } from 'Model/Identity';
|
||||
|
||||
import { folderListOptionsBuilder } from 'Common/Folders';
|
||||
import { i18n } from 'Common/Translator';
|
||||
import { defaultOptionsAfterRender } from 'Common/Utils';
|
||||
|
||||
export class IdentityPopupView extends AbstractViewPopup {
|
||||
constructor() {
|
||||
super('Identity');
|
||||
|
|
@ -27,6 +31,13 @@ export class IdentityPopupView extends AbstractViewPopup {
|
|||
this.replyTo.valueHasMutated();
|
||||
this.bcc.valueHasMutated();
|
||||
*/
|
||||
this.folderSelectList = koComputable(() =>
|
||||
folderListOptionsBuilder(
|
||||
[],
|
||||
[['', '('+i18n('GLOBAL/DEFAULT')+')']]
|
||||
)
|
||||
);
|
||||
this.defaultOptionsAfterRender = defaultOptionsAfterRender;
|
||||
}
|
||||
|
||||
submitForm(form) {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ class Identity implements \JsonSerializable
|
|||
|
||||
private string $sSignature = '';
|
||||
|
||||
private string $sSentFolder = '';
|
||||
|
||||
private bool $bSignatureInsertBefore = false;
|
||||
|
||||
private bool $bPgpEncrypt = false;
|
||||
|
|
@ -92,8 +94,9 @@ class Identity implements \JsonSerializable
|
|||
$this->sBcc = !empty($aData['Bcc']) ? $aData['Bcc'] : '';
|
||||
$this->sSignature = !empty($aData['Signature']) ? $aData['Signature'] : '';
|
||||
$this->bSignatureInsertBefore = !empty($aData['SignatureInsertBefore']);
|
||||
$this->bPgpEncrypt = !empty($aData['PgpEncrypt']);
|
||||
$this->bPgpSign = !empty($aData['PgpSign']);
|
||||
$this->sSentFolder = isset($aData['sentFolder']) ? $aData['sentFolder'] : '';
|
||||
$this->bPgpEncrypt = !empty($aData['pgpEncrypt']);
|
||||
$this->bPgpSign = !empty($aData['pgpSign']);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -112,8 +115,9 @@ class Identity implements \JsonSerializable
|
|||
'Bcc' => $this->sBcc,
|
||||
'Signature' => $this->sSignature,
|
||||
'SignatureInsertBefore' => $this->bSignatureInsertBefore,
|
||||
'PgpEncrypt' => $this->bPgpEncrypt,
|
||||
'PgpSign' => $this->bPgpSign
|
||||
'sentFolder' => $this->sSentFolder,
|
||||
'pgpEncrypt' => $this->bPgpEncrypt,
|
||||
'pgpSign' => $this->bPgpSign
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -130,6 +134,7 @@ class Identity implements \JsonSerializable
|
|||
'bcc' => $this->sBcc,
|
||||
'signature' => $this->sSignature,
|
||||
'signatureInsertBefore' => $this->bSignatureInsertBefore,
|
||||
'sentFolder' => $this->sSentFolder,
|
||||
'pgpEncrypt' => $this->bPgpEncrypt,
|
||||
'pgpSign' => $this->bPgpSign
|
||||
);
|
||||
|
|
|
|||
|
|
@ -52,29 +52,15 @@
|
|||
}"></div>
|
||||
</div>
|
||||
|
||||
<input type="radio" name="identitytabs" id="tab-identity-advanced">
|
||||
<label data-i18n="SETTINGS_FILTERS/ADVANCED" for="tab-identity-advanced" role="tab" aria-selected="false" aria-controls="panel3" tabindex="0"></label>
|
||||
<input type="radio" name="identitytabs" id="tab-identity-crypto">
|
||||
<label data-i18n="CONTACTS/TAB_CRYPTO" for="tab-identity-crypto" role="tab" aria-selected="false" aria-controls="panel3" tabindex="0"></label>
|
||||
<div class="form-horizontal tab-content" role="tabpanel" aria-hidden="false">
|
||||
<div class="control-group">
|
||||
<label data-i18n="GLOBAL/REPLY_TO"></label>
|
||||
<input name="ReplyTo" type="email" class="inputReplyTo input-xlarge"
|
||||
autocomplete="off" autocorrect="off" autocapitalize="off"
|
||||
data-bind="value: replyTo">
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label data-i18n="GLOBAL/BCC"></label>
|
||||
<input name="Bcc" type="email" class="inputBcc input-xlarge"
|
||||
autocomplete="off" autocorrect="off" autocapitalize="off"
|
||||
data-bind="value: bcc">
|
||||
</div>
|
||||
|
||||
<div class="legend" data-i18n="CONTACTS/TAB_CRYPTO"></div>
|
||||
<div data-bind="component: {
|
||||
name: 'Checkbox',
|
||||
params: {
|
||||
label: 'OPENPGP/LABEL_SIGN',
|
||||
value: pgpSign,
|
||||
name: 'PgpSign'
|
||||
name: 'pgpSign'
|
||||
}
|
||||
}"></div>
|
||||
<div data-bind="component: {
|
||||
|
|
@ -82,7 +68,7 @@
|
|||
params: {
|
||||
label: 'OPENPGP/LABEL_ENCRYPT',
|
||||
value: pgpEncrypt,
|
||||
name: 'PgpEncrypt'
|
||||
name: 'pgpEncrypt'
|
||||
}
|
||||
}"></div>
|
||||
<!--
|
||||
|
|
@ -97,6 +83,28 @@
|
|||
</div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<input type="radio" name="identitytabs" id="tab-identity-advanced">
|
||||
<label data-i18n="SETTINGS_FILTERS/ADVANCED" for="tab-identity-advanced" role="tab" aria-selected="false" aria-controls="panel4" tabindex="0"></label>
|
||||
<div class="form-horizontal tab-content" role="tabpanel" aria-hidden="false">
|
||||
<div class="control-group">
|
||||
<label data-i18n="GLOBAL/REPLY_TO"></label>
|
||||
<input name="ReplyTo" type="email" class="inputReplyTo input-xlarge"
|
||||
autocomplete="off" autocorrect="off" autocapitalize="off"
|
||||
data-bind="value: replyTo">
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label data-i18n="GLOBAL/BCC"></label>
|
||||
<input name="Bcc" type="email" class="inputBcc input-xlarge"
|
||||
autocomplete="off" autocorrect="off" autocapitalize="off"
|
||||
data-bind="value: bcc">
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label data-i18n="FOLDER_LIST/SENT_NAME"></label>
|
||||
<select name="sentFolder" data-bind="options: $root.folderSelectList, value: sentFolder,
|
||||
optionsText: 'name', optionsValue: 'id', optionsAfterRender: $root.defaultOptionsAfterRender"></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<footer>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue