mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 03:16:11 +02:00
🐛 Fix issues on penpot file import and components-v2
This commit is contained in:
parent
68c0b0e8a7
commit
8f72faf27d
3 changed files with 6 additions and 4 deletions
|
@ -268,7 +268,8 @@
|
||||||
(binding [pmap/*tracked* (atom {})]
|
(binding [pmap/*tracked* (atom {})]
|
||||||
(let [data (ctf/migrate-to-components-v2 data)
|
(let [data (ctf/migrate-to-components-v2 data)
|
||||||
features (conj features "components/v2")
|
features (conj features "components/v2")
|
||||||
modified-at (dt/now)]
|
modified-at (dt/now)
|
||||||
|
features (db/create-array conn "text" features)]
|
||||||
(db/update! conn :file
|
(db/update! conn :file
|
||||||
{:data (blob/encode data)
|
{:data (blob/encode data)
|
||||||
:modified-at modified-at
|
:modified-at modified-at
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
[app.common.types.component :as ctk]
|
[app.common.types.component :as ctk]
|
||||||
[app.common.types.components-list :as ctkl]
|
[app.common.types.components-list :as ctkl]
|
||||||
[app.common.types.pages-list :as ctpl]
|
[app.common.types.pages-list :as ctpl]
|
||||||
[app.common.types.shape :as cts]
|
|
||||||
[app.common.types.shape-tree :as ctst]
|
[app.common.types.shape-tree :as ctst]
|
||||||
[app.common.uuid :as uuid]))
|
[app.common.uuid :as uuid]))
|
||||||
|
|
||||||
|
@ -34,7 +33,7 @@
|
||||||
[:path {:optional true} [:maybe :string]]
|
[:path {:optional true} [:maybe :string]]
|
||||||
[:modified-at {:optional true} ::sm/inst]
|
[:modified-at {:optional true} ::sm/inst]
|
||||||
[:objects {:optional true}
|
[:objects {:optional true}
|
||||||
[:map-of {:gen/max 10} ::sm/uuid ::cts/shape]]])
|
[:map-of {:gen/max 10} ::sm/uuid :map]]])
|
||||||
|
|
||||||
(def container?
|
(def container?
|
||||||
(sm/pred-fn ::container))
|
(sm/pred-fn ::container))
|
||||||
|
@ -68,6 +67,7 @@
|
||||||
|
|
||||||
(defn get-shape
|
(defn get-shape
|
||||||
[container shape-id]
|
[container shape-id]
|
||||||
|
|
||||||
(dm/assert!
|
(dm/assert!
|
||||||
"expected valid container"
|
"expected valid container"
|
||||||
(container? container))
|
(container? container))
|
||||||
|
|
|
@ -31,7 +31,8 @@
|
||||||
[:type [:= "paragraph"]]
|
[:type [:= "paragraph"]]
|
||||||
[:key {:optional true} :string]
|
[:key {:optional true} :string]
|
||||||
[:fills {:optional true}
|
[:fills {:optional true}
|
||||||
[:vector {:gen/max 2} ::shape/fill]]
|
[:maybe
|
||||||
|
[:vector {:gen/max 2} ::shape/fill]]]
|
||||||
[:font-family {:optional true} :string]
|
[:font-family {:optional true} :string]
|
||||||
[:font-size {:optional true} :string]
|
[:font-size {:optional true} :string]
|
||||||
[:font-style {:optional true} :string]
|
[:font-style {:optional true} :string]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue