mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 23:18:48 -05:00
Merge pull request #3989 from penpot/niwinz-staging-bugfix-1
🐛 Bugfixes
This commit is contained in:
commit
03931da17a
5 changed files with 41 additions and 5 deletions
|
@ -357,7 +357,9 @@
|
||||||
f.is_shared,
|
f.is_shared,
|
||||||
ft.media_id
|
ft.media_id
|
||||||
from file as f
|
from file as f
|
||||||
left join file_thumbnail as ft on (ft.file_id = f.id and ft.revn = f.revn)
|
left join file_thumbnail as ft on (ft.file_id = f.id
|
||||||
|
and ft.revn = f.revn
|
||||||
|
and ft.deleted_at is null)
|
||||||
where f.project_id = ?
|
where f.project_id = ?
|
||||||
and f.deleted_at is null
|
and f.deleted_at is null
|
||||||
order by f.modified_at desc")
|
order by f.modified_at desc")
|
||||||
|
@ -660,7 +662,9 @@
|
||||||
row_number() over w as row_num
|
row_number() over w as row_num
|
||||||
from file as f
|
from file as f
|
||||||
inner join project as p on (p.id = f.project_id)
|
inner join project as p on (p.id = f.project_id)
|
||||||
left join file_thumbnail as ft on (ft.file_id = f.id and ft.revn = f.revn)
|
left join file_thumbnail as ft on (ft.file_id = f.id
|
||||||
|
and ft.revn = f.revn
|
||||||
|
and ft.deleted_at is null)
|
||||||
where p.team_id = ?
|
where p.team_id = ?
|
||||||
and p.deleted_at is null
|
and p.deleted_at is null
|
||||||
and f.deleted_at is null
|
and f.deleted_at is null
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
|
|
||||||
(ns app.common.files.defaults)
|
(ns app.common.files.defaults)
|
||||||
|
|
||||||
(def version 37)
|
(def version 38)
|
||||||
|
|
|
@ -671,3 +671,31 @@
|
||||||
(defmethod migrate 37
|
(defmethod migrate 37
|
||||||
[data]
|
[data]
|
||||||
(d/without-nils data))
|
(d/without-nils data))
|
||||||
|
|
||||||
|
(defmethod migrate 38
|
||||||
|
[data]
|
||||||
|
(letfn [(fix-gradient [{:keys [type] :as gradient}]
|
||||||
|
(if (string? type)
|
||||||
|
(assoc gradient :type (keyword type))
|
||||||
|
gradient))
|
||||||
|
|
||||||
|
(update-fill [fill]
|
||||||
|
(d/update-when fill :fill-color-gradient fix-gradient))
|
||||||
|
|
||||||
|
(update-object [object]
|
||||||
|
(d/update-when object :fills #(mapv update-fill %)))
|
||||||
|
|
||||||
|
(update-shape [shape]
|
||||||
|
(let [shape (update-object shape)]
|
||||||
|
(if (cfh/text-shape? shape)
|
||||||
|
(-> shape
|
||||||
|
(update :content (partial txt/transform-nodes identity update-fill))
|
||||||
|
(d/update-when :position-data #(mapv update-object %)))
|
||||||
|
shape)))
|
||||||
|
|
||||||
|
(update-container [container]
|
||||||
|
(update container :objects update-vals update-shape))]
|
||||||
|
|
||||||
|
(-> data
|
||||||
|
(update :pages-index update-vals update-container)
|
||||||
|
(update :components update-vals update-container))))
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
|
|
||||||
(sm/define! ::gradient
|
(sm/define! ::gradient
|
||||||
[:map {:title "Gradient"}
|
[:map {:title "Gradient"}
|
||||||
[:type [::sm/one-of #{:linear :radial "linear" "radial"}]]
|
[:type [::sm/one-of #{:linear :radial}]]
|
||||||
[:start-x ::sm/safe-number]
|
[:start-x ::sm/safe-number]
|
||||||
[:start-y ::sm/safe-number]
|
[:start-y ::sm/safe-number]
|
||||||
[:end-x ::sm/safe-number]
|
[:end-x ::sm/safe-number]
|
||||||
|
|
|
@ -375,8 +375,8 @@
|
||||||
{:frame-id uuid/zero
|
{:frame-id uuid/zero
|
||||||
:fills [{:fill-color clr/white
|
:fills [{:fill-color clr/white
|
||||||
:fill-opacity 1}]
|
:fill-opacity 1}]
|
||||||
:name "Board"
|
|
||||||
:strokes []
|
:strokes []
|
||||||
|
:name "Board"
|
||||||
:shapes []
|
:shapes []
|
||||||
:hide-fill-on-export false})
|
:hide-fill-on-export false})
|
||||||
|
|
||||||
|
@ -390,11 +390,15 @@
|
||||||
(def ^:private minimal-group-attrs
|
(def ^:private minimal-group-attrs
|
||||||
{:type :group
|
{:type :group
|
||||||
:name "Group"
|
:name "Group"
|
||||||
|
:fills []
|
||||||
|
:strokes []
|
||||||
:shapes []})
|
:shapes []})
|
||||||
|
|
||||||
(def ^:private minimal-bool-attrs
|
(def ^:private minimal-bool-attrs
|
||||||
{:type :bool
|
{:type :bool
|
||||||
:name "Bool"
|
:name "Bool"
|
||||||
|
:fills []
|
||||||
|
:strokes []
|
||||||
:shapes []})
|
:shapes []})
|
||||||
|
|
||||||
(def ^:private minimal-text-attrs
|
(def ^:private minimal-text-attrs
|
||||||
|
|
Loading…
Add table
Reference in a new issue