mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
✨ Add shortcuts to viewer btns
This commit is contained in:
parent
771bb20976
commit
f3548aff8c
8 changed files with 60 additions and 53 deletions
|
@ -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)})))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue