🐛 Fix go to library button

This commit is contained in:
Eva 2024-01-16 16:07:26 +01:00 committed by Alonso Torres
parent 01ad26c084
commit 827609db79
2 changed files with 14 additions and 14 deletions

View file

@ -109,17 +109,17 @@
:on-drop on-drop} :on-drop on-drop}
[:& typography-entry [:& typography-entry
{:typography typography {:file-id file-id
:typography typography
:local? local? :local? local?
:on-context-menu on-context-menu
:on-change handle-change
:selected? (contains? selected typography-id) :selected? (contains? selected typography-id)
:on-click on-asset-click :on-click on-asset-click
:on-change handle-change
:on-context-menu on-context-menu
:editing? editing? :editing? editing?
:renaming? renaming? :renaming? renaming?
:focus-name? rename? :focus-name? rename?
:external-open* open* :external-open* open*}]
:file-id file-id}]
(when ^boolean dragging? (when ^boolean dragging?
[:div {:class (stl/css :dragging)}])])) [:div {:class (stl/css :dragging)}])]))

View file

@ -205,7 +205,7 @@
#(swap! state* assoc-in [:more-options] (not more-options-open?))) #(swap! state* assoc-in [:more-options] (not more-options-open?)))
typography-id (:typography-ref-id values) typography-id (:typography-ref-id values)
typography-file (:typography-ref-file values) typography-file-id (:typography-ref-file values)
emit-update! emit-update!
(mf/use-fn (mf/use-fn
@ -228,14 +228,14 @@
(cond (cond
(and typography-id (and typography-id
(not= typography-id :multiple) (not= typography-id :multiple)
(not= typography-file file-id)) (not= typography-file-id file-id))
(-> shared-libs (-> shared-libs
(get-in [typography-file :data :typographies typography-id]) (get-in [typography-file-id :data :typographies typography-id])
(assoc :file-id typography-file)) (assoc :file-id typography-file-id))
(and typography-id (and typography-id
(not= typography-id :multiple) (not= typography-id :multiple)
(= typography-file file-id)) (= typography-file-id file-id))
(get typographies typography-id)))) (get typographies typography-id))))
on-convert-to-typography on-convert-to-typography
@ -297,9 +297,9 @@
[:div {:class (stl/css :element-content)} [:div {:class (stl/css :element-content)}
(cond (cond
typography typography
[:& typography-entry {:typography typography [:& typography-entry {:file-id typography-file-id
:local? (= typography-file file-id) :typography typography
:file (get shared-libs typography-file) :local? (= typography-file-id file-id)
:on-detach handle-detach-typography :on-detach handle-detach-typography
:on-change handle-change-typography}] :on-change handle-change-typography}]