mirror of
https://github.com/penpot/penpot.git
synced 2025-05-20 19:56:11 +02:00
🐛 Go to style library file to edit in a new tab
This commit is contained in:
parent
c073a66e7e
commit
d4dc32a5e5
3 changed files with 8 additions and 11 deletions
|
@ -461,7 +461,7 @@
|
|||
name-input-ref (mf/use-ref)
|
||||
on-change-ref (mf/use-ref nil)
|
||||
|
||||
name-ref (mf/use-ref (:name typography))
|
||||
name-ref (mf/use-ref (:name typography))
|
||||
|
||||
on-name-blur
|
||||
(mf/use-callback
|
||||
|
@ -472,12 +472,6 @@
|
|||
(let [[path name] (cph/parse-path-name content)]
|
||||
(on-change {:name name :path path}))))))
|
||||
|
||||
handle-go-to-edit
|
||||
(fn []
|
||||
(let [pparams {:project-id (:project-id file)
|
||||
:file-id (:id file)}]
|
||||
(st/emit! (rt/nav :workspace pparams))))
|
||||
|
||||
on-name-change
|
||||
(mf/use-callback
|
||||
(fn [event]
|
||||
|
@ -574,9 +568,11 @@
|
|||
[:span.label (tr "workspace.assets.typography.text-transform")]
|
||||
[:span (:text-transform typography)]]
|
||||
|
||||
[:div.go-to-lib-button
|
||||
{:on-click handle-go-to-edit}
|
||||
(tr "workspace.assets.typography.go-to-edit")]]
|
||||
[:div.row-flex
|
||||
[:a.go-to-lib-button {:on-click (st/emitf (rt/nav-new-window* {:rname :workspace
|
||||
:path-params {:project-id (:project-id file) :file-id (:id file)}
|
||||
:query-params {:page-id (get-in file [:data :pages 0])}}))}
|
||||
(tr "workspace.assets.typography.go-to-edit")]]]
|
||||
|
||||
[:*
|
||||
[:div.element-set-content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue