mirror of
https://github.com/penpot/penpot.git
synced 2025-05-23 18:46:12 +02:00
🐛 Better handling of components v2 in file builder
This commit is contained in:
parent
4b05ee35b8
commit
3bf76e8d0f
3 changed files with 24 additions and 12 deletions
|
@ -249,9 +249,18 @@
|
|||
(deleteObject [_ id]
|
||||
(set! file (fb/delete-object file (uuid/uuid id))))
|
||||
|
||||
(getId [_]
|
||||
(:id file))
|
||||
|
||||
(getCurrentPageId [_]
|
||||
(:current-page-id file))
|
||||
|
||||
(asMap [_]
|
||||
(clj->js file))
|
||||
|
||||
(newId [_]
|
||||
(uuid/next))
|
||||
|
||||
(export [_]
|
||||
(->> (export-file file)
|
||||
(rx/subs!
|
||||
|
@ -261,7 +270,8 @@
|
|||
(dom/trigger-download (:name file) export-blob))))))))
|
||||
|
||||
(defn create-file-export [^string name]
|
||||
(File. (fb/create-file name)))
|
||||
(binding [cfeat/*current* cfeat/default-features]
|
||||
(File. (fb/create-file name))))
|
||||
|
||||
(defn exports []
|
||||
#js {:createFile create-file-export})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue