mirror of
https://github.com/penpot/penpot.git
synced 2025-07-19 00:57:13 +02:00
✨ Use .penpot extension for binfile-v3 export format
This commit is contained in:
parent
07e40e78cd
commit
f78f843f7c
4 changed files with 31 additions and 25 deletions
|
@ -31,14 +31,14 @@
|
|||
[:project-id ::sm/uuid]
|
||||
[:is-shared ::sm/boolean]]])
|
||||
|
||||
(def check-export-files!
|
||||
(def check-export-files
|
||||
(sm/check-fn schema:export-files))
|
||||
|
||||
(defn export-files
|
||||
[files format]
|
||||
(dm/assert!
|
||||
"expected valid files param"
|
||||
(check-export-files! files))
|
||||
(check-export-files files))
|
||||
|
||||
(dm/assert!
|
||||
"expected valid format"
|
||||
|
|
|
@ -261,8 +261,8 @@
|
|||
:handler on-export-binary-files})
|
||||
|
||||
(when (contains? cf/flags :export-file-v3)
|
||||
{:name (tr "dashboard.export-binary-multi-v3" file-count)
|
||||
:id "file-binary-export-multi-v3"
|
||||
{:name (tr "dashboard.export-binary-multi" file-count)
|
||||
:id "file-binary-export-multi"
|
||||
:handler on-export-binary-files-v3})
|
||||
|
||||
(when-not (contains? cf/flags :export-file-v3)
|
||||
|
@ -320,8 +320,8 @@
|
|||
:handler on-export-binary-files})
|
||||
|
||||
(when (contains? cf/flags :export-file-v3)
|
||||
{:name (tr "dashboard.download-binary-file-v3")
|
||||
:id "download-binary-file-v3"
|
||||
{:name (tr "dashboard.download-binary-file")
|
||||
:id "download-binary-file"
|
||||
:handler on-export-binary-files-v3})
|
||||
|
||||
(when-not (contains? cf/flags :export-file-v3)
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.config :as cf]
|
||||
[app.main.data.exports.files :as fexp]
|
||||
[app.main.data.modal :as modal]
|
||||
[app.main.store :as st]
|
||||
|
@ -106,9 +107,13 @@
|
|||
(swap! state* update :files mark-file-error (:file-id msg))
|
||||
|
||||
(= :finish (:type msg))
|
||||
(do
|
||||
(let [mtype (if (contains? cf/flags :export-file-v3)
|
||||
"application/penpot"
|
||||
(:mtype msg))
|
||||
fname (:filename msg)
|
||||
uri (:uri msg)]
|
||||
(swap! state* update :files mark-file-success (:file-id msg))
|
||||
(dom/trigger-download-uri (:filename msg) (:mtype msg) (:uri msg)))))))))
|
||||
(dom/trigger-download-uri fname mtype uri))))))))
|
||||
|
||||
on-cancel
|
||||
(mf/use-fn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue