mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +03:00
Always allow raw editing of Sieve scripts
This commit is contained in:
parent
3ed7b53f68
commit
14ba459d46
20 changed files with 59 additions and 211 deletions
|
|
@ -3,6 +3,8 @@ import ko from 'ko';
|
|||
import { AbstractModel } from 'Knoin/AbstractModel';
|
||||
import { FilterModel } from 'Model/Filter';
|
||||
|
||||
const SIEVE_FILE_NAME = 'rainloop.user';
|
||||
|
||||
// collectionToFileString
|
||||
function filtersToSieveScript(filters)
|
||||
{
|
||||
|
|
@ -311,7 +313,7 @@ class SieveScriptModel extends AbstractModel
|
|||
* Only 'rainloop.user' script supports filters
|
||||
*/
|
||||
allowFilters() {
|
||||
return 'rainloop.user' === this.name();
|
||||
return SIEVE_FILE_NAME === this.name();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -331,7 +333,7 @@ class SieveScriptModel extends AbstractModel
|
|||
} else {
|
||||
script.filters([]);
|
||||
}
|
||||
script.canBeDeleted(0 !== json.name.indexOf('rainloop.user'));
|
||||
script.canBeDeleted(SIEVE_FILE_NAME !== json.name);
|
||||
script.exists(true);
|
||||
script.hasChanges(false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue