mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Improved Sieve gui style
This commit is contained in:
parent
cf692e49b4
commit
a82e8bcc40
9 changed files with 96 additions and 44 deletions
|
|
@ -7,6 +7,8 @@ import { parseScript } from 'Sieve/Parser';
|
|||
|
||||
import { availableActions, availableControls, availableTests } from 'Sieve/Commands';
|
||||
|
||||
import { ControlCommand, TestCommand, ActionCommand, GrammarComment } from 'Sieve/Grammar';
|
||||
|
||||
import {
|
||||
capa,
|
||||
scripts,
|
||||
|
|
@ -137,6 +139,57 @@ export class SieveScriptPopupView extends rl.pluginPopupView {
|
|||
return document.getElementById(id) ? id : 'SieveCommand';
|
||||
}
|
||||
|
||||
styleClass(obj) {
|
||||
if (obj instanceof ControlCommand) {
|
||||
return 'sieve-control';
|
||||
}
|
||||
if (obj instanceof TestCommand) {
|
||||
return 'sieve-test';
|
||||
}
|
||||
if (obj instanceof ActionCommand) {
|
||||
return 'sieve-action';
|
||||
}
|
||||
if (obj instanceof GrammarComment) {
|
||||
return 'sieve-comment';
|
||||
}
|
||||
/*
|
||||
if (obj instanceof GrammarString) {
|
||||
return 'sieve-string';
|
||||
}
|
||||
if (obj instanceof GrammarCommand) {
|
||||
return 'sieve-command';
|
||||
}
|
||||
if (obj instanceof GrammarCommands) {
|
||||
return 'sieve-commands';
|
||||
}
|
||||
if (obj instanceof GrammarTestList {
|
||||
return 'sieve-testlist';
|
||||
}
|
||||
if (obj instanceof GrammarBracketComment {
|
||||
return 'sieve-bcomment';
|
||||
}
|
||||
if (obj instanceof GrammarHashComment {
|
||||
return 'sieve-hcomment';
|
||||
}
|
||||
if (obj instanceof GrammarNumber {
|
||||
return 'sieve-number';
|
||||
}
|
||||
if (obj instanceof GrammarStringList {
|
||||
return 'sieve-stringlist';
|
||||
}
|
||||
if (obj instanceof GrammarQuotedString {
|
||||
return 'sieve-qstring';
|
||||
}
|
||||
if (obj instanceof GrammarMultiLine {
|
||||
return 'sieve-multiline';
|
||||
}
|
||||
if (obj instanceof UnknownCommand {
|
||||
return 'sieve-string';
|
||||
}
|
||||
*/
|
||||
return 'sieve-' + obj.constructor.name;
|
||||
}
|
||||
|
||||
beforeShow(oScript) {
|
||||
// onShow(oScript) {
|
||||
this.sieveCapabilities(capa.join(' '));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue