diff --git a/index.html b/index.html index 7698578..3a15ed0 100644 --- a/index.html +++ b/index.html @@ -9,13 +9,13 @@ - - - - - + + + + + - + Task List diff --git a/scripts/index.js b/scripts/index.js index b8fc9b4..84cfc8f 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -2,9 +2,12 @@ let params = {}; function respond(template, params) { Object.keys(params).forEach((key) => { - template = template.replace(`{${key}}`, params[key]); + console.log(`{${key}}: ${params[key]}`); + template = template.replaceAll(`{${key}}`, params[key]); }); + console.log(template); + ComfyJS.Say(template); } diff --git a/scripts/processCommand.js b/scripts/processCommand.js index f09f446..a8b191a 100644 --- a/scripts/processCommand.js +++ b/scripts/processCommand.js @@ -14,6 +14,7 @@ async function processCommand(user, command, message, flags, extra) { let addRequest = await addTask(user, extra.userColor, message); if (addRequest.status !== 200) { + params.task = `${openQuote}${message}${closeQuote}`; respond(addRequest.body.error, params); return; } @@ -25,7 +26,7 @@ async function processCommand(user, command, message, flags, extra) { addedResponse += ` | Failed to add task(s): "${addRequest.body.tasksFailedToAdd}"`; } - respond(addedResponse, params); + await respond(addedResponse, params); } else if (getCommand("editTaskCommands").includes(command)) { let editRequest = await editTask(user, message); diff --git a/scripts/taskList.js b/scripts/taskList.js index 6c715fe..e13ad9b 100644 --- a/scripts/taskList.js +++ b/scripts/taskList.js @@ -810,9 +810,9 @@ async function addTask(username, userColor, task) { let addedTaskIndices = addTaskFunction.body.addedTaskIndices; let tasksFailedToAdd = addTaskFunction.body.tasksFailedToAdd; - if (!scrolling) { - await renderTaskListToDOM(); - } + // if (!scrolling) { + await renderTaskListToDOM(); + // } let displayedTasksAdded = addedTaskIndices.map((t) => { return `(${t.index + 1}) ${t.task}`; diff --git a/styles/taskList.scss b/styles/taskList.scss index 96c9083..f049d54 100644 --- a/styles/taskList.scss +++ b/styles/taskList.scss @@ -65,6 +65,19 @@ box-sizing: border-box; } +@keyframes scroll { + 0% { + transform: translateY(0); + } + 100% { + transform: translateY(-100%); + } +} + +.primary, .secondary { + animation: scroll linear infinite; +} + #main-container { width: 100%;