X-Git-Url: http://git.scottworley.com/vopamoi/blobdiff_plain/3a1649301b207e07fcfa1eb0a617e4c5b2f775e8..68d693148efba8e2ff62bee1b5780d47f4920029:/vopamoi.ts?ds=inline 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();