mirror of
https://github.com/penpot/penpot.git
synced 2025-07-13 23:08:20 +02:00
Merge pull request #6777 from penpot/niwinz-staging-hotfix-1
🐛 Remove qualified keyword keys from colors
This commit is contained in:
commit
c51ae35fc5
4 changed files with 18 additions and 9 deletions
|
@ -37,7 +37,6 @@
|
||||||
{:mvn/version "1.3.1002"}
|
{:mvn/version "1.3.1002"}
|
||||||
metosin/reitit-core {:mvn/version "0.9.1"}
|
metosin/reitit-core {:mvn/version "0.9.1"}
|
||||||
nrepl/nrepl {:mvn/version "1.3.1"}
|
nrepl/nrepl {:mvn/version "1.3.1"}
|
||||||
cider/cider-nrepl {:mvn/version "0.56.0"}
|
|
||||||
|
|
||||||
org.postgresql/postgresql {:mvn/version "42.7.6"}
|
org.postgresql/postgresql {:mvn/version "42.7.6"}
|
||||||
org.xerial/sqlite-jdbc {:mvn/version "3.49.1.0"}
|
org.xerial/sqlite-jdbc {:mvn/version "3.49.1.0"}
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
[app.svgo :as-alias svgo]
|
[app.svgo :as-alias svgo]
|
||||||
[app.util.time :as dt]
|
[app.util.time :as dt]
|
||||||
[app.worker :as-alias wrk]
|
[app.worker :as-alias wrk]
|
||||||
[cider.nrepl :refer [cider-nrepl-handler]]
|
|
||||||
[clojure.test :as test]
|
[clojure.test :as test]
|
||||||
[clojure.tools.namespace.repl :as repl]
|
[clojure.tools.namespace.repl :as repl]
|
||||||
[cuerdas.core :as str]
|
[cuerdas.core :as str]
|
||||||
|
@ -605,7 +604,7 @@
|
||||||
(let [p (promise)]
|
(let [p (promise)]
|
||||||
(when (contains? cf/flags :nrepl-server)
|
(when (contains? cf/flags :nrepl-server)
|
||||||
(l/inf :hint "start nrepl server" :port 6064)
|
(l/inf :hint "start nrepl server" :port 6064)
|
||||||
(nrepl/start-server :bind "0.0.0.0" :port 6064 :handler cider-nrepl-handler))
|
(nrepl/start-server :bind "0.0.0.0" :port 6064))
|
||||||
|
|
||||||
(start)
|
(start)
|
||||||
(deref p))
|
(deref p))
|
||||||
|
|
|
@ -595,7 +595,11 @@
|
||||||
(teams/check-read-permissions! conn profile-id team-id)
|
(teams/check-read-permissions! conn profile-id team-id)
|
||||||
(->> (db/exec! conn [sql:team-shared-files team-id])
|
(->> (db/exec! conn [sql:team-shared-files team-id])
|
||||||
(into #{} (comp
|
(into #{} (comp
|
||||||
(map decode-row)
|
;; NOTE: this decode operation is a workaround for a
|
||||||
|
;; fast fix, this should be approached with a more
|
||||||
|
;; efficient implementation, for now it loads all
|
||||||
|
;; the files in memory.
|
||||||
|
(map (partial bfc/decode-file cfg))
|
||||||
(map (fn [row]
|
(map (fn [row]
|
||||||
(if-let [media-id (:media-id row)]
|
(if-let [media-id (:media-id row)]
|
||||||
(-> row
|
(-> row
|
||||||
|
|
|
@ -1468,14 +1468,21 @@
|
||||||
(update :pages-index d/update-vals update-container)
|
(update :pages-index d/update-vals update-container)
|
||||||
(d/update-when :components d/update-vals update-container))))
|
(d/update-when :components d/update-vals update-container))))
|
||||||
|
|
||||||
(defmethod migrate-data "0008-fix-library-colors-opacity"
|
(defmethod migrate-data "0008-fix-library-colors"
|
||||||
[data _]
|
[data _]
|
||||||
(letfn [(update-color [color]
|
(letfn [(clear-color-opacity [color]
|
||||||
(if (and (contains? color :opacity)
|
(if (and (contains? color :opacity)
|
||||||
(nil? (get color :opacity)))
|
(nil? (get color :opacity)))
|
||||||
(assoc color :opacity 1)
|
(assoc color :opacity 1)
|
||||||
color))]
|
color))
|
||||||
(d/update-when data :colors d/update-vals update-color)))
|
|
||||||
|
(clear-color [color]
|
||||||
|
(-> color
|
||||||
|
(d/without-nils)
|
||||||
|
(d/without-qualified)
|
||||||
|
(clear-color-opacity)))]
|
||||||
|
|
||||||
|
(d/update-when data :colors d/update-vals clear-color)))
|
||||||
|
|
||||||
(def available-migrations
|
(def available-migrations
|
||||||
(into (d/ordered-set)
|
(into (d/ordered-set)
|
||||||
|
@ -1540,4 +1547,4 @@
|
||||||
"0005-deprecate-image-type"
|
"0005-deprecate-image-type"
|
||||||
"0006-fix-old-texts-fills"
|
"0006-fix-old-texts-fills"
|
||||||
"0007-clear-invalid-strokes-and-fills-v2"
|
"0007-clear-invalid-strokes-and-fills-v2"
|
||||||
"0008-fix-library-colors-opacity"]))
|
"0008-fix-library-colors"]))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue