invites: add /invites/send, store more details in new SentTo field

deprecated SendTo string field for SentTo, which holds successful send
addresses, and failures with a reason that isn't plain text. Will soon
add an interface for sending invites after their creation. For #444
(ha).
This commit is contained in:
Harvey Tindall
2025-12-05 12:03:21 +00:00
parent 3635a13682
commit 5fa528fd2d
19 changed files with 327 additions and 144 deletions
+16 -1
View File
@@ -1626,7 +1626,8 @@ class MessageEditor {
} else {
for (let i = this._templ.conditionals.length-1; i >= 0; i--) {
let ci = i % colors.length;
innerHTML += '<span class="button ~' + colors[ci] +' @low mb-4" style="margin-left: 0.25rem; margin-right: 0.25rem;"></span>'
// FIXME: Store full color strings (with ~) so tailwind sees them.
innerHTML += '<span class="button ~' + colors[ci] +' @low"></span>'
}
this._conditionalsLabel.classList.remove("unfocused");
this._conditionals.innerHTML = innerHTML
@@ -1754,6 +1755,20 @@ class MessageEditor {
}
});
};
const descriptions = document.getElementsByClassName("editor-syntax-description") as HTMLCollectionOf<HTMLParagraphElement>;
for (let el of descriptions) {
el.innerHTML = window.lang.template("strings", "syntaxDescription", {
"variable": `<span class="font-mono font-bold">{varname}</span>`,
"ifTruth": `<span class="font-mono font-bold">{if address}Message sent to {address}{end}</span>`,
"ifCompare": `<span class="font-mono font-bold">{if profile == "Friends"}Friend{else if profile != "Admins"}User{end}</span>`
});
};
// Get rid of nasty CSS
window.modals.editor.onclose = () => {
this._preview.textContent = ``;
}
}
}