mirror of
https://github.com/penpot/penpot.git
synced 2025-02-12 18:18:24 -05:00
🐛 Fix graphic asset rename
This commit is contained in:
parent
fae79d67e6
commit
f2e389593a
2 changed files with 22 additions and 6 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
(ns app.common.spec.change
|
||||
(:require
|
||||
[app.common.spec :as us]
|
||||
[app.common.spec.color :as color]
|
||||
[app.common.spec.file :as file]
|
||||
[app.common.spec.page :as page]
|
||||
|
@ -124,16 +125,25 @@
|
|||
(defmethod change-spec :add-recent-color [_]
|
||||
(s/keys :req-un [:internal.changes.add-recent-color/color]))
|
||||
|
||||
(s/def :internal.changes.media/object ::file/media-object)
|
||||
|
||||
(s/def :internal.changes.add-media/object ::file/media-object)
|
||||
(defmethod change-spec :add-media [_]
|
||||
(s/keys :req-un [:internal.changes.media/object]))
|
||||
(s/keys :req-un [:internal.changes.add-media/object]))
|
||||
|
||||
(s/def :internal.changes.media.mod/object
|
||||
(s/and ::file/media-object #(contains? % :id)))
|
||||
|
||||
(s/def :internal.changes.mod-media/width ::us/safe-integer)
|
||||
(s/def :internal.changes.mod-media/height ::us/safe-integer)
|
||||
(s/def :internal.changes.mod-media/path (s/nilable string?))
|
||||
(s/def :internal.changes.mod-media/mtype string?)
|
||||
(s/def :internal.changes.mod-media/object
|
||||
(s/keys :req-un [::id]
|
||||
:opt-un [:internal.changes.mod-media/width
|
||||
:internal.changes.mod-media/height
|
||||
:internal.changes.mod-media/path
|
||||
:internal.changes.mod-media/mtype]))
|
||||
|
||||
(defmethod change-spec :mod-media [_]
|
||||
(s/keys :req-un [:internal.changes.media.mod/object]))
|
||||
(s/keys :req-un [:internal.changes.mod-media/object]))
|
||||
|
||||
(defmethod change-spec :del-media [_]
|
||||
(s/keys :req-un [::id]))
|
||||
|
|
|
@ -17,12 +17,18 @@
|
|||
(s/def :internal.media-object/height ::us/safe-integer)
|
||||
(s/def :internal.media-object/mtype string?)
|
||||
|
||||
;; NOTE: This is marked as nilable for backward compatibility, but
|
||||
;; right now is just exists or not exists. We can thin in a gradual
|
||||
;; migration and then mark it as not nilable.
|
||||
(s/def :internal.media-object/path (s/nilable string?))
|
||||
|
||||
(s/def ::media-object
|
||||
(s/keys :req-un [::id
|
||||
::name
|
||||
:internal.media-object/width
|
||||
:internal.media-object/height
|
||||
:internal.media-object/mtype]))
|
||||
:internal.media-object/mtype]
|
||||
:opt-un [:internal.media-object/path]))
|
||||
|
||||
(s/def ::colors
|
||||
(s/map-of uuid? ::color/color))
|
||||
|
|
Loading…
Add table
Reference in a new issue