From 262705dd315ec4bf7088cc3ec9013dc32f3e3bd3 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Tue, 25 Jan 2022 15:53:04 -0800 Subject: [PATCH] Writes go through the Log --- vopamoi.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vopamoi.ts b/vopamoi.ts index a3f6ce4..505781d 100644 --- a/vopamoi.ts +++ b/vopamoi.ts @@ -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; -- 2.44.1