mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 15:37:03 +03:00
Merge branch 'the-djmaze:master' into master
This commit is contained in:
commit
f8af48cf47
5 changed files with 483 additions and 357 deletions
|
|
@ -6,7 +6,7 @@ class CompactComposerPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
NAME = 'Compact Composer',
|
NAME = 'Compact Composer',
|
||||||
AUTHOR = 'Sergey Mosin',
|
AUTHOR = 'Sergey Mosin',
|
||||||
URL = 'https://github.com/the-djmaze/snappymail/pull/1466',
|
URL = 'https://github.com/the-djmaze/snappymail/pull/1466',
|
||||||
VERSION = '1.0.3',
|
VERSION = '1.0.4',
|
||||||
RELEASE = '2024-04-23',
|
RELEASE = '2024-04-23',
|
||||||
REQUIRED = '2.34.0',
|
REQUIRED = '2.34.0',
|
||||||
LICENSE = 'AGPL v3',
|
LICENSE = 'AGPL v3',
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,20 @@
|
||||||
pasteImageHandler(e, squire);
|
pasteImageHandler(e, squire);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
wysiwyg.addEventListener('focus', () => {
|
||||||
|
const range = this.squire.getSelection();
|
||||||
|
if (range.collapsed && range.startContainer === wysiwyg) {
|
||||||
|
// when the caret is directly in the wysiwyg a bunch of stuff
|
||||||
|
// (like lists, blockquotes, etc...) do not work,
|
||||||
|
// so we need to place it inside the nearest element
|
||||||
|
if (wysiwyg.children[range.startOffset] !== undefined) {
|
||||||
|
const newRange = document.createRange();
|
||||||
|
newRange.setStart(wysiwyg.children[range.startOffset], 0);
|
||||||
|
this.squire.setSelection(newRange);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// squire.addEventListener('focus', () => shortcuts.off());
|
// squire.addEventListener('focus', () => shortcuts.off());
|
||||||
// squire.addEventListener('blur', () => shortcuts.on());
|
// squire.addEventListener('blur', () => shortcuts.on());
|
||||||
|
|
||||||
|
|
@ -598,7 +612,7 @@
|
||||||
type: 'menu_item',
|
type: 'menu_item',
|
||||||
label: 'HTML Mode',
|
label: 'HTML Mode',
|
||||||
id: 'menu-item-mode-wysiwyg',
|
id: 'menu-item-mode-wysiwyg',
|
||||||
cmd: () => this.setMode('wysiwyg'),
|
cmd: () => this.setModeCmd('wysiwyg'),
|
||||||
showInPlainMode: true,
|
showInPlainMode: true,
|
||||||
icon: '<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m2 2v3h1v-2h2v-1zm13 0v1h2v2h1v-3zm-9 3v10h2v-4h4v4h2v-10h-2v4h-4v-4zm-4 10v3h3v-1h-2v-2zm15 0v2h-2v1h3v-3z"/></svg>'
|
icon: '<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m2 2v3h1v-2h2v-1zm13 0v1h2v2h1v-3zm-9 3v10h2v-4h4v4h2v-10h-2v4h-4v-4zm-4 10v3h3v-1h-2v-2zm15 0v2h-2v1h3v-3z"/></svg>'
|
||||||
},
|
},
|
||||||
|
|
@ -606,7 +620,7 @@
|
||||||
type: 'menu_item',
|
type: 'menu_item',
|
||||||
label: 'Edit Source',
|
label: 'Edit Source',
|
||||||
id: 'menu-item-mode-source',
|
id: 'menu-item-mode-source',
|
||||||
cmd: () => this.setMode('source'),
|
cmd: () => this.setModeCmd('source'),
|
||||||
showInPlainMode: true,
|
showInPlainMode: true,
|
||||||
icon: '<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12 2.83c-0.478-0.138-0.976 0.141-1.11 0.619l-3.6 12.6c-0.138 0.478 0.141 0.976 0.619 1.11 0.478 0.138 0.976-0.141 1.11-0.619l3.6-12.6c0.138-0.478-0.141-0.976-0.619-1.11zm2.27 4.65 2.51 2.51-2.51 2.51c-0.352 0.352-0.352 0.923 0 1.27 0.352 0.352 0.923 0.352 1.27 0l3.15-3.15c0.352-0.352 0.352-0.923 0-1.27l-3.15-3.15c-0.352-0.352-0.923-0.352-1.27-0.00141-0.35 0.35-0.35 0.921 0.00141 1.27zm-8.63-1.27c-0.352-0.352-0.923-0.352-1.27 0l-3.15 3.15c-0.352 0.352-0.352 0.923 0 1.27l3.15 3.15c0.352 0.352 0.923 0.352 1.27 0 0.352-0.352 0.352-0.923 0-1.27l-2.51-2.51 2.51-2.51c0.352-0.352 0.352-0.923 0-1.27z"/></svg>'
|
icon: '<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12 2.83c-0.478-0.138-0.976 0.141-1.11 0.619l-3.6 12.6c-0.138 0.478 0.141 0.976 0.619 1.11 0.478 0.138 0.976-0.141 1.11-0.619l3.6-12.6c0.138-0.478-0.141-0.976-0.619-1.11zm2.27 4.65 2.51 2.51-2.51 2.51c-0.352 0.352-0.352 0.923 0 1.27 0.352 0.352 0.923 0.352 1.27 0l3.15-3.15c0.352-0.352 0.352-0.923 0-1.27l-3.15-3.15c-0.352-0.352-0.923-0.352-1.27-0.00141-0.35 0.35-0.35 0.921 0.00141 1.27zm-8.63-1.27c-0.352-0.352-0.923-0.352-1.27 0l-3.15 3.15c-0.352 0.352-0.352 0.923 0 1.27l3.15 3.15c0.352 0.352 0.923 0.352 1.27 0 0.352-0.352 0.352-0.923 0-1.27l-2.51-2.51 2.51-2.51c0.352-0.352 0.352-0.923 0-1.27z"/></svg>'
|
||||||
},
|
},
|
||||||
|
|
@ -614,7 +628,7 @@
|
||||||
type: 'menu_item',
|
type: 'menu_item',
|
||||||
label: 'Plain Text Mode',
|
label: 'Plain Text Mode',
|
||||||
id: 'menu-item-mode-plain',
|
id: 'menu-item-mode-plain',
|
||||||
cmd: () => this.setMode('plain'),
|
cmd: () => this.setModeCmd('plain'),
|
||||||
showInPlainMode: true,
|
showInPlainMode: true,
|
||||||
icon: '<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m2 2v3h1v-2h2v-1zm13 0v1h2v2h1v-3zm-9 3v2h3v8h2v-8h3v-2zm-4 10v3h3v-1h-2v-2zm15 0v2h-2v1h3v-3z"/></svg>'
|
icon: '<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m2 2v3h1v-2h2v-1zm13 0v1h2v2h1v-3zm-9 3v2h3v8h2v-8h3v-2zm-4 10v3h3v-1h-2v-2zm15 0v2h-2v1h3v-3z"/></svg>'
|
||||||
}
|
}
|
||||||
|
|
@ -871,6 +885,12 @@
|
||||||
return validation.test(this.squire.getPath()) || this.squire.hasFormat(format);
|
return validation.test(this.squire.getPath()) || this.squire.hasFormat(format);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
setModeCmd(mode) {
|
||||||
|
this.setMode(mode);
|
||||||
|
setTimeout(() => this.focus(), 1);
|
||||||
|
}
|
||||||
|
|
||||||
setMode(mode) {
|
setMode(mode) {
|
||||||
if (this.mode !== mode) {
|
if (this.mode !== mode) {
|
||||||
let cl = this.container.classList,
|
let cl = this.container.classList,
|
||||||
|
|
@ -894,7 +914,6 @@
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
cl.add('squire2-mode-' + mode);
|
cl.add('squire2-mode-' + mode);
|
||||||
this.onModeChange?.();
|
this.onModeChange?.();
|
||||||
setTimeout(() => this.focus(), 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -17,6 +17,18 @@ namespace MailSo\Smtp;
|
||||||
use MailSo\Net\Enumerations\ConnectionSecurityType;
|
use MailSo\Net\Enumerations\ConnectionSecurityType;
|
||||||
use SnappyMail\IDN;
|
use SnappyMail\IDN;
|
||||||
|
|
||||||
|
/**
|
||||||
|
response codes:
|
||||||
|
220 ready
|
||||||
|
221 Closing
|
||||||
|
235 Authentication succeeded
|
||||||
|
250 Requested mail action okay, completed
|
||||||
|
251 User not local; will forward
|
||||||
|
252 Cannot verify the user, but it will try to deliver the message anyway
|
||||||
|
334 Server challenge (the text part contains the Base64-encoded challenge)
|
||||||
|
354 Start mail input
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @category MailSo
|
* @category MailSo
|
||||||
* @package Smtp
|
* @package Smtp
|
||||||
|
|
@ -183,7 +195,7 @@ class SmtpClient extends \MailSo\Net\NetClient
|
||||||
// RFC 5802
|
// RFC 5802
|
||||||
$sRequest = $SASL->authenticate($sLogin, $sPassword, $sResult);
|
$sRequest = $SASL->authenticate($sLogin, $sPassword, $sResult);
|
||||||
$this->logMask($sRequest);
|
$this->logMask($sRequest);
|
||||||
$sResult = $this->sendRequestWithCheck($sRequest, 234);
|
$sResult = $this->sendRequestWithCheck($sRequest, 334);
|
||||||
$sRequest = $SASL->challenge($sResult);
|
$sRequest = $SASL->challenge($sResult);
|
||||||
} else switch ($type) {
|
} else switch ($type) {
|
||||||
// RFC 4616
|
// RFC 4616
|
||||||
|
|
|
||||||
|
|
@ -286,10 +286,10 @@
|
||||||
"CREATE_SELF_SIGNED": "Criar auto-assinado",
|
"CREATE_SELF_SIGNED": "Criar auto-assinado",
|
||||||
"VALID_UNTIL": "Válido até",
|
"VALID_UNTIL": "Válido até",
|
||||||
"PRIVATE_KEY": "Chave privada",
|
"PRIVATE_KEY": "Chave privada",
|
||||||
"CHANGE_PASS": "Change passphrase",
|
"CHANGE_PASS": "Alterar frase secreta",
|
||||||
"CURRENT_PASS": "Current passphrase",
|
"CURRENT_PASS": "Frase secreta atual",
|
||||||
"NEW_PASS": "New passphrase",
|
"NEW_PASS": "Nova frase secreta",
|
||||||
"ASK_CRYPTKEY_PASS": "Your login passphrase has changed. Please fill in your old login passphrase to decrypt data"
|
"ASK_CRYPTKEY_PASS": "A sua frase secreta de autenticação foi alterada. Por favor, preencha a sua frase secreta antiga para desencriptar os dados"
|
||||||
},
|
},
|
||||||
"OPENPGP": {
|
"OPENPGP": {
|
||||||
"POPUP_IMPORT_TITLE": "Importar chave OpenPGP",
|
"POPUP_IMPORT_TITLE": "Importar chave OpenPGP",
|
||||||
|
|
@ -616,7 +616,7 @@
|
||||||
"DemoAccountError": "Por motivos de segurança, esta conta não tem permissão de executar esta ação!",
|
"DemoAccountError": "Por motivos de segurança, esta conta não tem permissão de executar esta ação!",
|
||||||
"AccountAlreadyExists": "Esta conta já existe",
|
"AccountAlreadyExists": "Esta conta já existe",
|
||||||
"AccountDoesNotExist": "Esta conta não existe",
|
"AccountDoesNotExist": "Esta conta não existe",
|
||||||
"AccountSwitchFailed": "A mudança para a conta \"%EMAIL%\" falhou",
|
"AccountSwitchFailed": "A alteração para a conta \"%EMAIL%\" falhou",
|
||||||
"MailServerError": "Ocorreu um erro ao aceder ao servidor de correio",
|
"MailServerError": "Ocorreu um erro ao aceder ao servidor de correio",
|
||||||
"InvalidInputArgument": "Parâmetro de entrada inválido",
|
"InvalidInputArgument": "Parâmetro de entrada inválido",
|
||||||
"UnknownError": "Erro desconhecido"
|
"UnknownError": "Erro desconhecido"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue