X-Git-Url: http://git.scottworley.com/vopamoi/blobdiff_plain/8e0dd97e0d4b07448bb1bde4f109e5192df1aa77..c948f3b419535ad0774392636d2fd1166fb6e312:/vopamoi.ts?ds=sidebyside diff --git a/vopamoi.ts b/vopamoi.ts index 33e37a3..6ba608a 100644 --- a/vopamoi.ts +++ b/vopamoi.ts @@ -276,6 +276,7 @@ function BrowserUI() { todo: "White", waiting: "MediumOrchid", }; + var currentTagView: string | null = null; var currentViewState = "todo"; var taskFocusedBeforeJumpingToInput: HTMLElement | null = null; var lastTagNameEntered = ""; @@ -291,6 +292,9 @@ function BrowserUI() { this.firstVisibleTask()?.focus(); } input.value = ""; + if (currentTagView) { + ui.addTag(task.getAttribute("data-created")!, currentTagView); + } if (event.getModifierState("Control")) { this.makeBottomPriority(task); } @@ -464,6 +468,7 @@ function BrowserUI() { }, resetTagView: function () { + currentTagView = null; for (const task of document.getElementsByClassName("task")) { task.classList.remove("hide"); } @@ -519,6 +524,7 @@ function BrowserUI() { task.classList.add("hide"); } } + currentTagView = tag; }, setView: function (state: string) {