Add shortcuts to viewer btns

This commit is contained in:
eva 2021-12-20 09:26:24 +01:00 committed by Alonso Torres
parent 771bb20976
commit f3548aff8c
8 changed files with 60 additions and 53 deletions

View file

@ -549,12 +549,14 @@
(ptk/reify ::go-to-workspace
ptk/WatchEvent
(watch [_ state _]
(let [project-id (get-in state [:viewer :project :id])
(let [route (:route state)
project-id (get-in state [:viewer :project :id])
file-id (get-in state [:viewer :file :id])
saved-page-id (get-in route [:query-params :page-id])
pparams {:project-id project-id :file-id file-id}
qparams {:page-id (or page-id (:current-page-id state))}]
qparams {:page-id (or page-id saved-page-id)}]
(rx/of (rt/nav-new-window*
{:rname :workspace
:path-params pparams
:query-params qparams
:name (str "workspace-" file-id)})))))))
:name (str "workspace-" file-id)})))))))