mirror of
https://github.com/penpot/penpot.git
synced 2025-07-17 00:05:18 +02:00
✨ Allows drag-drop files into dashboard
This commit is contained in:
parent
1894fc7cfa
commit
60009476d6
10 changed files with 169 additions and 52 deletions
|
@ -93,7 +93,13 @@
|
|||
(fn []
|
||||
(let [mdata {:on-success on-file-created}
|
||||
params {:project-id (:id project)}]
|
||||
(st/emit! (dd/create-file (with-meta params mdata))))))]
|
||||
(st/emit! (dd/create-file (with-meta params mdata))))))
|
||||
|
||||
on-import
|
||||
(mf/use-callback
|
||||
(fn []
|
||||
(st/emit! (dd/fetch-recent-files)
|
||||
(dd/clear-selected-files))))]
|
||||
|
||||
[:div.dashboard-project-row {:class (when first? "first")}
|
||||
[:div.project
|
||||
|
@ -111,7 +117,8 @@
|
|||
:left (:x (:menu-pos @local))
|
||||
:top (:y (:menu-pos @local))
|
||||
:on-edit on-edit-open
|
||||
:on-menu-close on-menu-close}]
|
||||
:on-menu-close on-menu-close
|
||||
:on-import on-import}]
|
||||
|
||||
[:span.info (str file-count " files")]
|
||||
(when (> file-count 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue