mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
New Sieve GUI improvements #80
This commit is contained in:
parent
ffc2da33f8
commit
0bd3804265
48 changed files with 181 additions and 144 deletions
|
|
@ -43,11 +43,12 @@ class FlagCommand extends ActionCommand
|
|||
if (args[0] instanceof GrammarQuotedString) {
|
||||
this._variablename = args[0];
|
||||
}
|
||||
if (args[1] instanceof GrammarString) {
|
||||
this.list_of_flags = args[1];
|
||||
}
|
||||
} else if (args[0] instanceof GrammarString) {
|
||||
args[0] = args[1];
|
||||
}
|
||||
if (args[0] instanceof GrammarStringList) {
|
||||
this.list_of_flags = args[0];
|
||||
} else if (args[0]) {
|
||||
this.list_of_flags.push(args[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export class GrammarString /*extends String*/
|
|||
{
|
||||
constructor(value = '')
|
||||
{
|
||||
this._value = value;
|
||||
this._value = value.toString ? value.toString() : value;
|
||||
}
|
||||
|
||||
toString()
|
||||
|
|
@ -227,6 +227,7 @@ export class GrammarStringList extends Array
|
|||
{
|
||||
toString()
|
||||
{
|
||||
// if there is only a single string, the brackets are optional
|
||||
if (1 < this.length) {
|
||||
return '[' + this.join(',') + ']';
|
||||
}
|
||||
|
|
@ -235,7 +236,7 @@ export class GrammarStringList extends Array
|
|||
|
||||
push(value)
|
||||
{
|
||||
if (!(value instanceof GrammarString)) {
|
||||
if (!(value instanceof GrammarQuotedString)) {
|
||||
value = new GrammarQuotedString(value);
|
||||
}
|
||||
super.push(value);
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ export class SieveScriptPopupView extends rl.pluginPopupView {
|
|||
|
||||
templateName(obj) {
|
||||
const id = 'Sieve' + obj.constructor.name;
|
||||
return document.getElementById(id) ? id : null;
|
||||
return document.getElementById(id) ? id : 'SieveCommand';
|
||||
}
|
||||
|
||||
beforeShow(oScript) {
|
||||
|
|
|
|||
|
|
@ -34,3 +34,16 @@
|
|||
height: 300px;
|
||||
font-family: var(--fontMono);
|
||||
}
|
||||
|
||||
.sieve-block {
|
||||
border: 1px solid var(--border-color, #ddd);
|
||||
margin: 1em 0;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.sieve-block > div {
|
||||
padding-left:2em;
|
||||
}
|
||||
.sieve-block > details > div {
|
||||
padding-left:1em;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue