🎉 Add many functions to assets panel and big refactor

This commit is contained in:
Andrés Moya 2021-05-12 14:00:30 +02:00
parent 3c7dda02c6
commit b2fef7b7a8
9 changed files with 906 additions and 446 deletions

View file

@ -71,6 +71,13 @@
(update [_ state]
(assoc-in state [:workspace-local :assets-files-open file-id box] open?))))
(defn set-assets-group-open
[file-id box path open?]
(ptk/reify ::set-assets-group-open
ptk/UpdateEvent
(update [_ state]
(assoc-in state [:workspace-local :assets-files-open file-id :groups box path] open?))))
(defn default-color-name [color]
(or (:color color)
(case (get-in color [:gradient :type])

View file

@ -105,7 +105,9 @@
{:class (dom/classnames :is-selected (and selected (= option-name selected)))
:key option-name}
(if-not sub-options
[:a.context-menu-action {:on-click option-handler}
[:a.context-menu-action {:on-click #(do (dom/stop-propagation %)
(on-close)
(option-handler %))}
option-name]
[:a.context-menu-action.submenu
{:data-no-close true

File diff suppressed because it is too large Load diff