mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 00:06:38 +02:00
Merge remote-tracking branch 'origin/staging' into niwinz-merge-staging-1
This commit is contained in:
commit
c3d4444c0c
6 changed files with 33 additions and 5 deletions
|
@ -20,6 +20,7 @@
|
||||||
### :bug: Bugs fixed
|
### :bug: Bugs fixed
|
||||||
|
|
||||||
- Fix error when importing files with touched components [Taiga #9625](https://tree.taiga.io/project/penpot/issue/9625)
|
- Fix error when importing files with touched components [Taiga #9625](https://tree.taiga.io/project/penpot/issue/9625)
|
||||||
|
- Fix problem when changing color libraries [Plugins #184](https://github.com/penpot/penpot-plugins/issues/184)
|
||||||
|
|
||||||
## 2.4.0
|
## 2.4.0
|
||||||
|
|
||||||
|
|
|
@ -148,6 +148,11 @@
|
||||||
(let [f (obj/get global "externalContextInfo")]
|
(let [f (obj/get global "externalContextInfo")]
|
||||||
(when (fn? f) (f))))
|
(when (fn? f) (f))))
|
||||||
|
|
||||||
|
(defn initialize-external-context-info
|
||||||
|
[]
|
||||||
|
(let [f (obj/get global "initializeExternalConfigInfo")]
|
||||||
|
(when (fn? f) (f))))
|
||||||
|
|
||||||
;; --- Helper Functions
|
;; --- Helper Functions
|
||||||
|
|
||||||
(defn ^boolean check-browser? [candidate]
|
(defn ^boolean check-browser? [candidate]
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
[app.common.exceptions :as ex]
|
[app.common.exceptions :as ex]
|
||||||
[app.common.schema :as sm]
|
[app.common.schema :as sm]
|
||||||
[app.common.uuid :as uuid]
|
[app.common.uuid :as uuid]
|
||||||
|
[app.config :as cf]
|
||||||
[app.main.data.common :as dcm]
|
[app.main.data.common :as dcm]
|
||||||
[app.main.data.event :as ev]
|
[app.main.data.event :as ev]
|
||||||
[app.main.data.notifications :as ntf]
|
[app.main.data.notifications :as ntf]
|
||||||
|
@ -74,6 +75,8 @@
|
||||||
|
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ _ stream]
|
(watch [_ _ stream]
|
||||||
|
(cf/initialize-external-context-info)
|
||||||
|
|
||||||
(->> (rx/merge
|
(->> (rx/merge
|
||||||
(rx/of (dp/set-profile profile)
|
(rx/of (dp/set-profile profile)
|
||||||
(ws/initialize)
|
(ws/initialize)
|
||||||
|
|
|
@ -193,6 +193,25 @@
|
||||||
(watch [it state _]
|
(watch [it state _]
|
||||||
(update-color* it state color file-id)))))
|
(update-color* it state color file-id)))))
|
||||||
|
|
||||||
|
(defn update-color-data
|
||||||
|
"Update color data without affecting the path location"
|
||||||
|
[color file-id]
|
||||||
|
(let [color (d/without-nils color)]
|
||||||
|
|
||||||
|
(dm/assert!
|
||||||
|
"expected valid color data structure"
|
||||||
|
(ctc/check-color! color))
|
||||||
|
|
||||||
|
(dm/assert!
|
||||||
|
"expected file-id"
|
||||||
|
(uuid? file-id))
|
||||||
|
|
||||||
|
(ptk/reify ::update-color-data
|
||||||
|
ptk/WatchEvent
|
||||||
|
(watch [it state _]
|
||||||
|
(let [color (assoc color :name (dm/str (:path color) "/" (:name color)))]
|
||||||
|
(update-color* it state color file-id))))))
|
||||||
|
|
||||||
(defn rename-color
|
(defn rename-color
|
||||||
[file-id id new-name]
|
[file-id id new-name]
|
||||||
(dm/assert!
|
(dm/assert!
|
||||||
|
|
|
@ -478,7 +478,7 @@
|
||||||
|
|
||||||
request-access?
|
request-access?
|
||||||
(and
|
(and
|
||||||
(= (:type data) :not-found)
|
(or (= (:type data) :not-found) (= (:type data) :authentication))
|
||||||
(or workspace? dashboard? view?)
|
(or workspace? dashboard? view?)
|
||||||
(or (:file-id info)
|
(or (:file-id info)
|
||||||
(:team-id info)))]
|
(:team-id info)))]
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
:else
|
:else
|
||||||
(let [color (-> (u/proxy->library-color self)
|
(let [color (-> (u/proxy->library-color self)
|
||||||
(assoc :color value))]
|
(assoc :color value))]
|
||||||
(st/emit! (dwl/update-color color file-id)))))}
|
(st/emit! (dwl/update-color-data color file-id)))))}
|
||||||
|
|
||||||
:opacity
|
:opacity
|
||||||
{:this true
|
{:this true
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
:else
|
:else
|
||||||
(let [color (-> (u/proxy->library-color self)
|
(let [color (-> (u/proxy->library-color self)
|
||||||
(assoc :opacity value))]
|
(assoc :opacity value))]
|
||||||
(st/emit! (dwl/update-color color file-id)))))}
|
(st/emit! (dwl/update-color-data color file-id)))))}
|
||||||
|
|
||||||
:gradient
|
:gradient
|
||||||
{:this true
|
{:this true
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
:else
|
:else
|
||||||
(let [color (-> (u/proxy->library-color self)
|
(let [color (-> (u/proxy->library-color self)
|
||||||
(assoc :gradient value))]
|
(assoc :gradient value))]
|
||||||
(st/emit! (dwl/update-color color file-id))))))}
|
(st/emit! (dwl/update-color-data color file-id))))))}
|
||||||
|
|
||||||
:image
|
:image
|
||||||
{:this true
|
{:this true
|
||||||
|
@ -151,7 +151,7 @@
|
||||||
:else
|
:else
|
||||||
(let [color (-> (u/proxy->library-color self)
|
(let [color (-> (u/proxy->library-color self)
|
||||||
(assoc :image value))]
|
(assoc :image value))]
|
||||||
(st/emit! (dwl/update-color color file-id))))))}
|
(st/emit! (dwl/update-color-data color file-id))))))}
|
||||||
|
|
||||||
:remove
|
:remove
|
||||||
(fn []
|
(fn []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue