From: Scott Worley Date: Wed, 2 Mar 2022 00:06:11 +0000 (-0800) Subject: "vp" to view the tag "Project" X-Git-Url: http://git.scottworley.com/vopamoi/commitdiff_plain/68d693148efba8e2ff62bee1b5780d47f4920029 "vp" to view the tag "Project" --- diff --git a/vopamoi.ts b/vopamoi.ts index f624db1..f13e579 100644 --- a/vopamoi.ts +++ b/vopamoi.ts @@ -522,10 +522,12 @@ function BrowserUI() { return ui.setState(createTimestamp, newState, oldState); }, - setTagView: function () { - const target = this.currentTag(); - if (!target) return; - const tag = target.textContent!; + setTagView: function (tag: string | null = null) { + if (tag === null) { + const target = this.currentTag(); + if (!target) return; + tag = target.textContent!; + } if (currentTagView !== null) { this.resetTagView(); @@ -673,6 +675,7 @@ function handleKey(event: any) { if (event.key == "c") return browserUI.setView("cancelled"); if (event.key == "d") return browserUI.setView("done"); if (event.key == "i") return browserUI.setUntaggedView(); + if (event.key == "p") return browserUI.setTagView("Project"); if (event.key == "q") return browserUI.setView("todo"); if (event.key == "s") return (inputState = InputState.VS); if (event.key == "T") return browserUI.resetTagView();