]> git.scottworley.com Git - vopamoi/commitdiff
Writes go through the Log
authorScott Worley <scottworley@scottworley.com>
Tue, 25 Jan 2022 23:53:04 +0000 (15:53 -0800)
committerScott Worley <scottworley@scottworley.com>
Thu, 27 Jan 2022 20:21:09 +0000 (12:21 -0800)
vopamoi.ts

index a3f6ce45dc5e5259e70bc77a52a5b7d6df4c4b2b..505781d70f5180513e5fa0f85616daee5bc0f549 100644 (file)
@@ -22,6 +22,12 @@ const Model = {
   },
 };
 
+const Log = {
+  addTask: function (description: string) {
+    Model.addTask(description);
+  },
+};
+
 function handleKey(event: any) {
   if (event.target.tagName !== "INPUT") {
     if (event.key == "j") Model.moveCursor(1);
@@ -35,7 +41,7 @@ function handleKey(event: any) {
 
 function browserCreateTask(form: any) {
   if (form.taskName.value) {
-    Model.addTask(form.taskName.value);
+    Log.addTask(form.taskName.value);
   }
   form.taskName.value = "";
   return false;