Merge pull request #938 from penpot/assets-enhancements

assets improvements
This commit is contained in:
Andrey Antukh 2021-06-02 11:10:34 +02:00 committed by GitHub
commit 09b72588d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 908 additions and 448 deletions

View file

@ -68,6 +68,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