Note names now do not bug the menu

This commit is contained in:
Tracker-Friendly 2023-11-23 19:30:08 +00:00
parent b0b05185f6
commit d641589a4b
1 changed files with 5 additions and 0 deletions

View File

@ -493,6 +493,11 @@ newNote.addEventListener("click", (event) => {
let noteName = displayPrompt("Note name?", "E.G Shopping list", burgerFunction)
function burgerFunction(noteName) {
if (noteName != null) {
if (noteName.length > 21) {
displayError("Invalid note name: Too long (max 21 characters)");
return;
}
let encryptedName = CryptoJS.AES.encrypt(noteName, password).toString();
fetch("/api/newnote", {
method: "POST",