mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Activate more Sieve extensions and use parseScript when saving script
This commit is contained in:
parent
58f5e90f8f
commit
40adf992ed
9 changed files with 39 additions and 38 deletions
|
|
@ -43,6 +43,9 @@ export class SieveScriptPopupView extends rl.pluginPopupView {
|
|||
let self = this,
|
||||
script = self.script();
|
||||
if (!self.saving/* && script.hasChanges()*/) {
|
||||
this.errorText('');
|
||||
self.saveError(false);
|
||||
|
||||
if (!script.verify()) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -52,9 +55,14 @@ export class SieveScriptPopupView extends rl.pluginPopupView {
|
|||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
parseScript(this.script().body());
|
||||
} catch (e) {
|
||||
this.errorText(e.message);
|
||||
return;
|
||||
}
|
||||
|
||||
self.saving = true;
|
||||
self.saveError(false);
|
||||
self.errorText('');
|
||||
|
||||
if (self.allowToggle()) {
|
||||
script.body(script.filtersToRaw());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue