emails: fix conditionals not being cleared on editor load

This commit is contained in:
Harvey Tindall
2025-08-31 17:31:48 +01:00
parent e67f1bf1a9
commit febbe27a0d
2 changed files with 2 additions and 1 deletions

View File

@@ -52,7 +52,7 @@ var customContent = map[string]CustomContentInfo{
"time",
),
Placeholders: defaultVals(map[string]any{
"expiresIn": "3d",
"expiresIn": "3d 4h 32m",
"date": "20/08/25",
"time": "14:19",
}),

View File

@@ -1137,6 +1137,7 @@ class MessageEditor {
innerHTML = '';
if (this._templ.conditionals == null || this._templ.conditionals.length == 0) {
this._conditionalsLabel.classList.add("unfocused");
this._conditionals.textContent = ``;
} else {
for (let i = this._templ.conditionals.length-1; i >= 0; i--) {
let ci = i % colors.length;