enhance: g a to all pages, g g to graph view, g f to open flashcards

close #3393
This commit is contained in:
Tienson Qin
2021-12-09 22:03:19 +08:00
parent 86740dd1d4
commit f50b048776
2 changed files with 36 additions and 5 deletions

View File

@@ -27,6 +27,14 @@
(when pub-event? (state/pub-event! [:redirect-to-home]))
(redirect! {:to :home})))
(defn redirect-to-all-pages!
[]
(redirect! {:to :all-pages}))
(defn redirect-to-graph-view!
[]
(redirect! {:to :graph}))
(defn redirect-to-page!
([page-name]
(recent-handler/add-page-to-recent! (state/get-current-repo) page-name)