mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-22 00:50:12 +00:00
Fix email editor for other email types
This commit is contained in:
parent
d772e43e44
commit
90a2c1f2e7
@ -47,8 +47,7 @@ func templateEmail(content string, variables []string, conditionals []string, va
|
||||
}
|
||||
ifEnd = i - 1
|
||||
if ifTrue {
|
||||
b := templateEmail(content[ifStart:ifEnd+1], variables, conditionals, values)
|
||||
out += b
|
||||
out += templateEmail(content[ifStart:ifEnd+1], variables, conditionals, values)
|
||||
ifTrue = false
|
||||
}
|
||||
} else if c == '}' {
|
||||
|
@ -859,15 +859,14 @@ class EmailEditor {
|
||||
}
|
||||
|
||||
innerHTML = '';
|
||||
if (this._templ.conditionals == null || this._templ.conditionals.length == 0) {
|
||||
this._conditionalsLabel.classList.add("unfocused");
|
||||
} else {
|
||||
for (let i = this._templ.conditionals.length-1; i >= 0; i--) {
|
||||
let ci = i % colors.length;
|
||||
innerHTML += '<span class="button ~' + colors[ci] +' !normal mb-1" style="margin-left: 0.25rem; margin-right: 0.25rem;"></span>'
|
||||
}
|
||||
if (this._templ.conditionals.length == 0) {
|
||||
this._conditionalsLabel.classList.add("unfocused");
|
||||
} else {
|
||||
this._conditionalsLabel.classList.remove("unfocused");
|
||||
}
|
||||
this._conditionals.innerHTML = innerHTML
|
||||
buttons = this._conditionals.querySelectorAll("span.button") as NodeListOf<HTMLSpanElement>;
|
||||
for (let i = 0; i < this._templ.conditionals.length; i++) {
|
||||
@ -878,7 +877,7 @@ class EmailEditor {
|
||||
// this._timeout = setTimeout(this.loadPreview, this._finishInterval);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
window.modals.editor.show();
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user